I have experimented with this a little and here are few notes

   - lock file remains in place - this is consistent with shutdown hooks 
   not being executed during JVM abort
   - size of DB file remains intact during runtime but during process 
   termination the size rises by approximately 50MB - which contradicts 
   previous point and it seems there is something executed during abort
   - I can replicate problem with 100% success rate using our app but I 
   fail to create test app to replicate the problem (still have a few ideas to 
   try)
   - I can replicate the problem with older 1.3.x releases as well as with 
   latest 1.4.x release (with MV_STORE=FALSE)
   - even though I do not think that there are transactions in progress at 
   the time of termination it is possible there are open cursors or something 
   similar - read-related

I can avoid this problem by running H2 in server mode but that is not what 
I want. 

Tono

On Tuesday, May 20, 2014 3:16:03 PM UTC+2, too wrote:
>
> Hi,
> Sometimes when our application is shut down forcibly it is unable to start 
> again with exceptions below. It does not appear that transaction is in 
> progress at the time of shutdown but I can not be sure. I was unable to 
> create test case but our application reproduces this quite consistently 
> (it's very rare that it starts after being terminated). 
> I have attached debug trace file for failed start - not for the shutdown. 
> I tried INFO logging for shutdown (breaking the db) but nothing seemed 
> interesting there, just bunch of selects. Also no error is logged during 
> shutdown or startup.
>
> Environment details are
>
>    - H2 - 1.3.176
>    - Java Runtime     - Java(TM) SE Runtime Environment (1.7.0_17-b02, 
>    32b) on Java HotSpot(TM) Client VM (23.7-b01, mixed mode)
>    - Operating System - Windows 7 (64b, Service Pack 1, version 6.1) 
>    - connection URL - jdbc:h2:./dbfile;IFEXISTS=TRUE
>
>
> NullPointerException - this is what usually happens
>
> org.h2.jdbc.JdbcSQLException: General error: 
> "java.lang.NullPointerException" [50000-176]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) 
> ~[h2.jar:1.3.176]
> at org.h2.message.DbException.get(DbException.java:167) ~[h2.jar:1.3.176]
> at org.h2.message.DbException.convert(DbException.java:294) 
> ~[h2.jar:1.3.176]
> at org.h2.engine.Database.openDatabase(Database.java:291) ~[h2.jar:1.3.176]
> at org.h2.engine.Database.<init>(Database.java:254) ~[h2.jar:1.3.176]
> at org.h2.engine.Engine.openSession(Engine.java:57) ~[h2.jar:1.3.176]
> at org.h2.engine.Engine.openSession(Engine.java:164) ~[h2.jar:1.3.176]
> at org.h2.engine.Engine.createSessionAndValidate(Engine.java:142) 
> ~[h2.jar:1.3.176]
> at org.h2.engine.Engine.createSession(Engine.java:125) ~[h2.jar:1.3.176]
> at org.h2.engine.Engine.createSession(Engine.java:27) ~[h2.jar:1.3.176]
> at 
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:331) 
> ~[h2.jar:1.3.176]
> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107) 
> ~[h2.jar:1.3.176]
> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91) 
> ~[h2.jar:1.3.176]
> at org.h2.Driver.connect(Driver.java:74) ~[h2.jar:1.3.176]
> at java.sql.DriverManager.getConnection(DriverManager.java:579) 
> ~[na:1.7.0_17]
> at java.sql.DriverManager.getConnection(DriverManager.java:221) 
> ~[na:1.7.0_17]
> at ...
> ... 12 common frames omitted
> Caused by: java.lang.NullPointerException: null
> at org.h2.store.PageStore.removeMeta(PageStore.java:1642) ~[h2.jar:1.3.176]
> at org.h2.store.PageStore.redo(PageStore.java:1565) ~[h2.jar:1.3.176]
> at org.h2.store.PageStore.redoDelete(PageStore.java:1550) ~[h2.jar:1.3.176]
> at org.h2.store.PageLog.recover(PageLog.java:347) ~[h2.jar:1.3.176]
> at org.h2.store.PageStore.recover(PageStore.java:1407) ~[h2.jar:1.3.176]
> at org.h2.store.PageStore.openExisting(PageStore.java:368) 
> ~[h2.jar:1.3.176]
> at org.h2.store.PageStore.open(PageStore.java:289) ~[h2.jar:1.3.176]
> at org.h2.engine.Database.getPageStore(Database.java:2366) 
> ~[h2.jar:1.3.176]
> at org.h2.engine.Database.open(Database.java:657) ~[h2.jar:1.3.176]
> at org.h2.engine.Database.openDatabase(Database.java:260) ~[h2.jar:1.3.176]
> ... 25 common frames omitted
>
>
> ArrayIndexOutOfBoundsException - I got this one only once
>
> Caused by: org.h2.jdbc.JdbcSQLException: General error: 
> "java.lang.ArrayIndexOutOfBoundsException: 44" [50000-176]
>         at 
> org.h2.message.DbException.getJdbcSQLException(DbException.java:344) 
> ~[h2.jar:1.3.176]
>         at org.h2.message.DbException.get(DbException.java:167) 
> ~[h2.jar:1.3.176]
>         at org.h2.message.DbException.convert(DbException.java:294) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Database.openDatabase(Database.java:291) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Database.<init>(Database.java:254) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Engine.openSession(Engine.java:57) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Engine.openSession(Engine.java:164) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Engine.createSessionAndValidate(Engine.java:142) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Engine.createSession(Engine.java:125) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Engine.createSession(Engine.java:27) 
> ~[h2.jar:1.3.176]
>         at 
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:331) 
> ~[h2.jar:1.3.176]
>         at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107) 
> ~[h2.jar:1.3.176]
>         at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91) 
> ~[h2.jar:1.3.176]
>         at org.h2.Driver.connect(Driver.java:74) ~[h2.jar:1.3.176]
>         at java.sql.DriverManager.getConnection(DriverManager.java:579) 
> ~[na:1.7.0_17]
>         at java.sql.DriverManager.getConnection(DriverManager.java:221) 
> ~[na:1.7.0_17]
>         at 
> com.stsjava.fieldit.dbdrv.dbjdbc.DbJdbcDataToolkit.createConnection(DbJdbcDataToolkit.java:490)
>  
> ~[fieldit.jar:na]
>         ... 12 common frames omitted
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 44
>         at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:333) 
> ~[h2.jar:1.3.176]
>         at org.h2.index.PageDataLeaf.getRowWithKey(PageDataLeaf.java:456) 
> ~[h2.jar:1.3.176]
>         at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:281) 
> ~[h2.jar:1.3.176]
>         at 
> org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex.java:427) 
> ~[h2.jar:1.3.176]
>         at org.h2.store.PageStore.redoDelete(PageStore.java:1549) 
> ~[h2.jar:1.3.176]
>         at org.h2.store.PageLog.recover(PageLog.java:347) ~[h2.jar:1.3.176]
>         at org.h2.store.PageStore.recover(PageStore.java:1407) 
> ~[h2.jar:1.3.176]
>         at org.h2.store.PageStore.openExisting(PageStore.java:368) 
> ~[h2.jar:1.3.176]
>         at org.h2.store.PageStore.open(PageStore.java:289) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Database.getPageStore(Database.java:2366) 
> ~[h2.jar:1.3.176]
>         at org.h2.engine.Database.open(Database.java:657) ~[h2.jar:1.3.176]
>         at org.h2.engine.Database.openDatabase(Database.java:260) 
> ~[h2.jar:1.3.176]
>         ... 25 common frames omitted
>
>
> thanks
> Tono 
>

-- 
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.

Reply via email to