Some additional information: the .lobs.db directory, which appears to be causing the exception, is not the same as the database's directory.
When I took the MAX_LENGTH_INPLACE_LOB statement out, the <db>.lobs.db directory gets created in the same directory as the <db>.h2.db file and operates as I would expect. However, the .lobs.db directory is created in the same directory as the .exe which runs the JVM in which H2 exists. Interesting. Jim On Aug 31, 3:04 pm, Jim Moy <[email protected]> wrote: > Hi H2 Folks, > > Here is an exception I'm trying to figure out, after upgrading from > 1.1.113 to 1.2.140. I am trying to reduce it to a minimal test case > but have not been able to yet, and only see it in my full server > product: > > org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "C: > \Program Files\Apache Software Foundation\Apache Tomcat 6.0.18\bin > \.lobs.db\1.temp.db". Possible solution: use the recovery tool > [90030-140] > at > org.h2.message.DbException.getJdbcSQLException(DbException.java: > 327) > at org.h2.message.DbException.get(DbException.java:167) > at org.h2.message.DbException.get(DbException.java:144) > at > org.h2.engine.SessionRemote.openFile(SessionRemote.java:603) > at org.h2.value.ValueLob.getInputStream(ValueLob.java:610) > at org.h2.jdbc.JdbcBlob.getBinaryStream(JdbcBlob.java:156) > > I have "SET MAX_LENGTH_INPLACE_LOB 1048576" executed when the database > is created. My table has a BLOB(64M) field in it, which in this case > has 120 KB inserted into it successfully according to the H2 console, > but when I go to get an input stream on it, the exception occurs, as > if it doesn't realize the LOB is in-place. > > The file referred to in the exception, 1.temp.db, does not exist, and > the .lobs.db directory is created, but is empty. Perhaps it would help > if someone could tell me when the .lobs.db directory is required, > particularly when my LOBs should be in-place? > > Regards, > > Jim Moy > Cerience Corporation -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
