akarshan2701 / h2database

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

java.lang.NullPointerException at org.h2.message.TraceSystem.getTrace(TraceSystem.java:83) #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Here is the stack trace:
Caused by: java.lang.NullPointerException
    at java.util.LinkedHashMap$Entry.addBefore(LinkedHashMap.java:333)
    at java.util.LinkedHashMap$Entry.access$600(LinkedHashMap.java:309)
    at java.util.LinkedHashMap.createEntry(LinkedHashMap.java:437)
    at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:418)
    at java.util.HashMap.put(HashMap.java:474)
    at org.h2.message.TraceSystem.getTrace(TraceSystem.java:83)
    at org.h2.engine.Database.getTrace(Database.java:382)
    at org.h2.command.Command.<init>(Command.java:87)
    at org.h2.command.CommandContainer.<init>(CommandContainer.java:25)
    at org.h2.command.Parser.prepareCommand(Parser.java:231)
    at org.h2.engine.Session.prepareLocal(Session.java:236)
    at org.h2.engine.Session.prepareCommand(Session.java:218)
    at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1020)
    at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:1217)
    at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:163)
    at
com.j_spaces.sadapter.GenericJDBC.JDBCStorageAdapter.internalUpdateEntry(JDBCSto
rageAdapter.java:4558)

As it seem to me the issue is caused by not synchronized access to global
variable "traces" inside TraceSystem class by multiple threads.

Original issue reported on code.google.com by Barak.Bar on 28 Oct 2008 at 2:35

GoogleCodeExporter commented 8 years ago
Hi,

What version of H2 do you use? From the stack trace it looks like quite an old
version. I believe this problem is already fixed.

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 29 Oct 2008 at 8:56

GoogleCodeExporter commented 8 years ago
Can not reproduce with a newer version.

Original comment by thomas.t...@gmail.com on 7 Nov 2008 at 3:28