Hi Thomas, Answers to some of your questions are inline below. The application is deployed to a large set of heterogeneous end user machines, so I don’t have answers to some of these questions at this time. I’ll try to collect more information about the system environment the next time I receive a report of this error.
Paul From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Mueller Sent: Thursday, April 09, 2015 11:42 PM To: [email protected] Subject: EXTERNAL: Re: [h2] Database Corruption 1.4.182 Hi, I'm afraid the trace file does not help much. This looks like a corrupt database. To recover the data, use the tool org.h2.tools.Recover to create the SQL script file, and then re-create the database using this script. Does it work when you do this? I have a few questions: - What is your database URL? jdbc:h2:nio:~/tva/tvadb;MODE=PostgreSQL;MV_STORE=FALSE;EARLY_FILTER=TRUE;QUERY_CACHE_SIZE=16 - Did you use LOG=0 or LOG=1? Did you read the FAQ about it? No, I did not use these options - Did the system ever run out of disk space? I will try and gather this information - Could you send the full stack trace of the exception including message text? Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "page[14853] stream trunk key:66 next:15873". Possible solution: use the recovery tool [90030-182] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.message.DbException.get(DbException.java:179) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.message.DbException.get(DbException.java:155) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:241) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:214) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.index.PageDataIndex.<init>(PageDataIndex.java:87) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.table.RegularTable.<init>(RegularTable.java:83) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.store.PageStore.addMeta(PageStore.java:1697) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.store.PageStore.readMetaData(PageStore.java:1628) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.store.PageStore.recover(PageStore.java:1405) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.store.PageStore.openExisting(PageStore.java:367) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.store.PageStore.open(PageStore.java:288) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Database.getPageStore(Database.java:2390) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Database.open(Database.java:666) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Database.openDatabase(Database.java:266) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Database.<init>(Database.java:260) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Engine.openSession(Engine.java:60) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Engine.openSession(Engine.java:167) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Engine.createSession(Engine.java:128) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.Engine.createSession(Engine.java:26) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.Driver.connect(Driver.java:72) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:190) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:353) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:385) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:227) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:199) ~[h2-1.4.182.jar.pack.gz:1.4.182] at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50) ~[flyway-core-3.0.jar.pack.gz:na] ... 35 common frames omitted - Did you use SHUTDOWN DEFRAG or the database setting DEFRAG_ALWAYS with H2 version 1.3.159 or older? No - How many connections does your application use concurrently? The application uses a connection pool with a maximum of 10 active connections. - Do you use temporary tables? No - With which version of H2 was this database created? You can find it out using: select * from information_schema.settings where name='CREATE_BUILD' or have a look in the SQL script created by the recover tool. 1.4.182 - Did the application run out of memory (once, or multiple times)? I don’t think so, I’ve never seen any errors in the application log file indicating it ran out of memory - Do you use any settings or special features (for example cache settings, two phase commit, linked tables)? >From the connection URL, the settings I use are: MODE=PostgreSQL MV_STORE=FALSE EARLY_FILTER=TRUE QUERY_CACHE_SIZE=16 It also uses the nio file system - Do you use any H2-specific system properties? No - Is the application multi-threaded? Yes, it is a GUI application with background processing threads - What operating system, file system, and virtual machine (java -version) do you use? I will try and gather this information - How did you start the Java process (java -Xmx... and so on)? The application is launched using Java Web Start, so it would a command something like: C:\Windows\SysWOW64\javaws.exe -localfile -J-Djnlp.application.href=http://localhost:8080/workbook/webstart/launch.jnlp "C:\Users\paul\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\58\461678ba-54aa4905" - Is it (or was it at some point) a networked file system? I will try and gather this information - How big is the database (file sizes)? I will try and gather this information - How much heap memory does the Java process have? The application is set to use a max heap size of 1000 megabytes - Is the database usually closed normally, or is process terminated forcefully or the computer switched off? I will try and gather this information - Is it possible to reproduce this problem using a fresh database (sometimes, or always)? No, I’ve not been to reproduce the problem - Could you send the .h2.db file where this exception occurs? I will try and gather this information Regards, Thomas On Thursday, April 9, 2015, <[email protected]<mailto:[email protected]>> wrote: In case it helps diagnose, I've attached a trace file from one of the users as well. -- 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 [email protected]<javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>. To post to this group, send email to [email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/_tfwvAB39fY/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
