lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Exception on shutdown #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

A runtime shutdown thread executes "shutdown" SQL, occasionally producing

Db Shutdown> org.h2.jdbc.JdbcSQLException: General error:
java.lang.NullPointerException; SQL statement:
shutdown [50000-109]
        at org.h2.message.Message.getSQLException(Message.java:107)
        at org.h2.message.Message.convert(Message.java:278)
        at org.h2.command.Command.executeUpdate(Command.java:230)
        at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:164)
        at net.eagle.db.Shutdown.run(Shutdown.java:67)
Caused by: java.lang.NullPointerException
        at
org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:180)
        at org.h2.command.CommandContainer.update(CommandContainer.java:71)
        at org.h2.command.Command.executeUpdate(Command.java:207)
        ... 2 more

wondering if i could be doing something better.. never seems to cause a
problem.. but then again my tables right now are beyond trivial.

thanks,
john

Original issue reported on code.google.com by john.douglas.pritchard on 6 Apr 2009 at 9:09

GoogleCodeExporter commented 9 years ago
Please don't log bugs for questions. It's better to use the Google Group 
instead.

Most likely the problem is that H2 also registers a shutdown hook. You should 
disable it:

http://www.h2database.com/html/features.html#do_not_close_on_exit

Original comment by thomas.t...@gmail.com on 7 Apr 2009 at 11:07