Vaibhav95g / h2database

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

NPE when updating lob with 1.4.177 (works on 1.3.175) #558

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Noticed this regression with the new engine on JRuby, SQL before failure :

"CREATE TABLE topics (id bigint identity, title varchar(255), content clob, 
important clob, type varchar(255), created_at timestamp NOT NULL, updated_at 
timestamp NOT NULL)"

"INSERT INTO topics (content, created_at, important, title, type, updated_at) 
VALUES (?, ?, ?, ?, ?, ?)" [["content", "--- string\n"], ["created_at", 
2014-04-15 09:20:56 UTC], ["important", nil], ["title", nil], ["type", nil], 
["updated_at", 2014-04-15 09:20:56 UTC]]

NOTE: only happens with prepared statements

Caused by: java.lang.NullPointerException
    at org.h2.store.LobStorageMap.removeLob(LobStorageMap.java:276)
    at org.h2.store.LobStorageMap.removeLob(LobStorageMap.java:268)
    at org.h2.value.ValueLobDb.close(ValueLobDb.java:228)
    at org.h2.engine.Session.commit(Session.java:499)
    at org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:47)
    at org.h2.command.CommandContainer.update(CommandContainer.java:79)
    at org.h2.command.Command.executeUpdate(Command.java:254)
    ... 280 more

triggered from a commit (seems not relevant but just for the record) :

General error: "java.lang.NullPointerException"; SQL statement:
COMMIT [50000-177]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.convert(DbException.java:294)
    at org.h2.command.Command.executeUpdate(Command.java:262)
    at org.h2.jdbc.JdbcConnection.commit(JdbcConnection.java:467)
    at org.h2.jdbc.JdbcConnection.setAutoCommit(JdbcConnection.java:429)
    at arjdbc.jdbc.RubyJdbcConnection.rollback(RubyJdbcConnection.java:295)

Original issue reported on code.google.com by karol.bu...@gmail.com on 15 Apr 2014 at 9:30

GoogleCodeExporter commented 9 years ago
Hi,

I can't reproduce the problem with the description you gave. I would like to 
know the exact JDBC calls made. Could you append ";trace_level_system_out=3" to 
the database URL and run the test again? That would print all the JDBC method 
calls to stdout. Or append ";trace_level_file=3" to the database URL, and then 
post the file <databaseName>.trace.db. Please make the test case as simple as 
possible, but so that it still reproduces the problem.

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 15 Apr 2014 at 4:03

GoogleCodeExporter commented 9 years ago
Should be fixed in 1.4.178

Original comment by thomas.t...@gmail.com on 2 May 2014 at 1:18

GoogleCodeExporter commented 9 years ago
I can confirm the original issue is gone ... Thanks

Original comment by karol.bu...@gmail.com on 28 May 2014 at 7:11