java.io.FileNotFoundException: h2errors.txt exception

124 views
Skip to first unread message

ady

unread,
Aug 21, 2013, 9:24:02 AM8/21/13
to h2-da...@googlegroups.com
Hi,
  We are see following exeption in our log file, it seems these are happening during insert/update time. Please let me know if anyone has experience the same and was able to get rid of it.
Any pointers or help would be much appreciated.

org.h2.message.DbException: IO Exception: "java.io.FileNotFoundException: h2errors.txt (Read-only file system)"; "h2errors.txt" [90031-142]
        at org.h2.message.DbException.get(DbException.java:156)
        at org.h2.message.DbException.convertIOException(DbException.java:313)
        at org.h2.store.fs.FileSystemDisk.openFileOutputStream(FileSystemDisk.java:400)
        at org.h2.util.IOUtils.openFileOutputStream(IOUtils.java:640)
        at org.h2.message.TraceObject.logAndConvert(TraceObject.java:391)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:124)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
        at org.h2.Driver.connect(Driver.java:73)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at pcjava.tools.db.PCDBConnectionManager.doOpen(PCDBConnectionManager.java:1076)
        at pcjava.tools.db.PCDBConnectionManager.open(PCDBConnectionManager.java:947)
        at pcjava.tools.db.PCDBConnectionManager.open(PCDBConnectionManager.java:889)
        at pcjava.tools.db.PCDBDataSource.getConnection(PCDBDataSource.java:84)
        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
        at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:698)
        at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:133)
        at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:182)
        at com.pc.pchub.pds.dao.jdbc.JdbcProductDictionaryServiceDao.getProductsForIdTypeInSingleBatch(JdbcProductDictionaryServiceDao.java:533)
        at com.pc.pchub.pds.dao.jdbc.JdbcProductDictionaryServiceDao.getProductsForIdType(JdbcProductDictionaryServiceDao.java:483)
        at com.pc.pchub.pds.cache.H2ProductCache.getProductsByFid1Id(H2ProductCache.java:109)
        at com.pc.pchub.pds.cache.H2ProductCache.getProducts(H2ProductCache.java:200)
        at com.pc.pchub.pds.client.ProductDictionaryClient.getProducts(ProductDictionaryClient.java:103)
        at com.pc.pchub.drs.client.DemandRegistrationClient.processMarketMakerDetails(DemandRegistrationClient.java:102)
        at com.pc.pchub.drs.client.DemandRegistrationClient.getMarketMakerDetails(DemandRegistrationClient.java:82)
        at com.pc.pchub.gws.worker.TransformerTask.getMarketMakerDetailsMap(TransformerTask.java:705)
        at com.pc.pchub.gws.worker.TransformerTask.executeTask(TransformerTask.java:316)
        at com.pc.pchub.gws.worker.TransformerTask.run(TransformerTask.java:207)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: h2errors.txt (Read-only file system)"; "h2errors.txt" [90031-142]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
        ... 35 more
Caused by: java.io.FileNotFoundException: h2errors.txt (Read-only file system)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
        at org.h2.store.fs.FileSystemDisk.openFileOutputStream(FileSystemDisk.java:392)
        ... 32 more

Noel Grandin

unread,
Aug 21, 2013, 9:39:51 AM8/21/13
to h2-da...@googlegroups.com, ady
Looks like something went wrong when a connection was opened, and H2
tried to log the exception, but failed because the filesystem is read-only.

If you don't want H2 to write things to the filesystem, you should
probably tweak your trace settings. See here:
http://h2database.com/html/features.html#trace_options

Also, you're quite a few versions out of date, so I can't guarantee that
the current trace options are exactly what your version supports.
So you should probably check the features.html file included in your
download.

Thomas Mueller

unread,
Aug 21, 2013, 1:13:14 PM8/21/13
to H2 Google Group
Hi,

Yes, you are using quite an old version of H2 (about 2 years old).

Also, did you set the property "h2.logAllErrors"? If yes, I suggest to disable it. This should solve the problem as well.

Regards,
Thomas



--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscribe@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages