Errors in trace.db when closing Database

37 views
Skip to first unread message

Uli

unread,
Mar 6, 2012, 9:39:38 AM3/6/12
to H2 Database
Hi,

today I tried the latest H2 1.3.164 release.
My application compacts that database from time to time by closing all
connections and running "SHUTDOWN COMPACT". After that it reopens the
database by creating a pooled connection.

Using 1.3.164 I see the following exceptions in the trace file:

03-06 12:31:32 database: close
java.lang.NullPointerException
at org.h2.index.PageDataLeaf.moveTo(PageDataLeaf.java:552)
at org.h2.store.PageStore.compact(PageStore.java:709)
at org.h2.store.PageStore.compact(PageStore.java:523)
at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1198)
at org.h2.engine.Database.close(Database.java:1148)
at org.h2.engine.Database.removeSession(Database.java:1027)
at org.h2.engine.Session.close(Session.java:563)
at org.h2.jdbc.JdbcConnection.close(JdbcConnection.java:365)
at <my source code>

03-06 12:31:40 database: close
java.lang.ClassCastException: org.h2.store.PageStreamData cannot be
cast to org.h2.index.PageDataNode
at org.h2.index.PageDataLeaf.moveTo(PageDataLeaf.java:551)
at org.h2.store.PageStore.compact(PageStore.java:709)
at org.h2.store.PageStore.compact(PageStore.java:523)
at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1198)
at org.h2.engine.Database.close(Database.java:1148)
at org.h2.engine.Database.removeSession(Database.java:1027)
at org.h2.engine.Session.close(Session.java:563)
at
org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:
110)
at org.h2.command.CommandContainer.update(CommandContainer.java:73)
at org.h2.command.Command.executeUpdate(Command.java:226)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)
at <my source code>

The database seems to be ok so it's not a problem for me.
But I want to let you know about the exceptions. Maybe something is
wrong there?

Ulrich

Uli

unread,
Mar 7, 2012, 3:04:54 AM3/7/12
to H2 Database
I get the NullPointerException also if I open and close the db with
the H2 console:

03-07 09:03:05 database: close
java.lang.NullPointerException
at org.h2.index.PageDataLeaf.moveTo(PageDataLeaf.java:552)
at org.h2.store.PageStore.compact(PageStore.java:709)
at org.h2.store.PageStore.compact(PageStore.java:523)
at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1198)
at org.h2.engine.Database.close(Database.java:1148)
at org.h2.engine.Database.removeSession(Database.java:1027)
at org.h2.engine.Session.close(Session.java:563)
at org.h2.jdbc.JdbcConnection.close(JdbcConnection.java:365)
at org.h2.server.web.WebApp.logout(WebApp.java:925)
at org.h2.server.web.WebApp.process(WebApp.java:209)
at org.h2.server.web.WebApp.processRequest(WebApp.java:164)
at org.h2.server.web.WebThread.process(WebThread.java:137)
at org.h2.server.web.WebThread.run(WebThread.java:93)
at java.lang.Thread.run(Unknown Source)

The DB was initially created with H2 1.2.147.

Ulrich

Thomas Mueller

unread,
Mar 19, 2012, 3:23:48 PM3/19/12
to h2-da...@googlegroups.com
Hi,

This should not occur. It doesn't look like it would corrupt the database, but really such errors should not occur. Could you send me the database file? I would like to better understand the problem.

Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Reply all
Reply to author
Forward
0 new messages