I'm using H2 1.3.172 on a Windows machine with the following connection
string:
jdbc:h2:tcp://localhost/dev/*****;LOG=0;UNDO_LOG=0;DB_CLOSE_ON_EXIT=TRUE;IGNORECASE=TRUE;OPTIMIZE_REUSE_RESULTS=0;QUERY_TIMEOUT=180000;MAX_OPERATION_MEMORY=0;MAX_MEMORY_ROWS=30000;COMPRESS_LOB=NO;LOCK_MODE=0;MULTI_THREADED=0;CACHE_SIZE=1048576;TRACE_LEVEL_FILE=2;
I receive the following exception when trying to connect to an existing
database:
General error: "java.lang.NullPointerException"
Scenario:
- I have a highly complex process around the H2 database.
- It all works fine with no issues.
- When the IIS reaches an idle session timeout an attempt to close any
open connections is made.
-
Failure as shown in the trace log (last few lines):
06-02 15:32:33 jdbc[2]: /*SQL #:1*/UPDATE UserTokens SET Timestamp_Expires =
DATEADD('MINUTE', 20, Timestamp_Expires) WHERE Token = '1812493846';06-02
15:32:33 jdbc[2]: /*SQL #:1*/SELECT QC_Result FROM QueryCache WHERE QC_Query =
'COMMAND::usp_Engine_Metrics_FindByName||PARAM::@name%%VarChar%%50%%Hands
Played||';06-02 15:32:33 jdbc[2]: /*SQL #:1*/SELECT RC_Result FROM ResultsCache
WHERE RC_ID = '5/2/2013 12:00:00 AM_6/1/2013 11:59:59 PM__Hands
Played|_Day_True____0';06-02 15:32:33 jdbc[2]: /*SQL #:1*/UPDATE UserTokens SET
Timestamp_Expires = DATEADD('MINUTE', 20, Timestamp_Expires) WHERE Token =
'1812493846';06-02 15:32:33 jdbc[2]: /*SQL #:1*/INSERT INTO UserState (US_ID,
US_State) VALUES
('b72e861a3c04a5b1ab8282eb6605b9e0','{\"view\":\"dashboard\",\"dashboardID\":21,\"panelID\":-1,\"reportID\":-1,\"fromdate\":null,\"todate\":null,\"guid\":\"b72e861a3c04a5b1ab8282eb6605b9e0\",\"timestamp\":\"2013-06-02T12:32:33.183Z\"}');06-02
15:35:49 jdbc[2]: /*SQL */COMMIT;06-02 15:35:49 jdbc[2]: /*SQL
*/ROLLBACK;06-02 15:35:49 database: disconnecting session #206-02 15:35:49
database: closing C:/Program Files (x86)/H2/service/dev/JarvisDB06-02 15:35:49
database: close
java.lang.ArrayIndexOutOfBoundsException: 2048
at org.h2.store.Data.writeValue(Data.java:406)
at org.h2.store.Data.writeValue(Data.java:640)
at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:396)
at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:446)
at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:420)
at org.h2.store.PageStore.writeBack(PageStore.java:1012)
at org.h2.store.PageStore.writeBack(PageStore.java:412)
at org.h2.store.PageStore.checkpoint(PageStore.java:430)
at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1211)
at org.h2.engine.Database.close(Database.java:1164)
at org.h2.engine.Database.removeSession(Database.java:1043)
at org.h2.engine.Session.close(Session.java:617)
at org.h2.server.TcpServerThread.closeSession(TcpServerThread.java:177)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:272)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:151)
at java.lang.Thread.run(Unknown Source)06-02 15:35:49 database: closed06-02
15:35:49 database: disconnected session #2
I assume the issue with me closing the connection, but I could really use
some guidance as to the exact cause and workaround.
Many thanks,
Itay
--
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?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.