1.4.183 NullPointerException...

73 views
Skip to first unread message

Kenton Garner

unread,
Dec 16, 2014, 5:39:59 PM12/16/14
to h2-da...@googlegroups.com
Thomas I was testing with the
Set Retention_Time....  checkpoint....
Code to compact the MVStore online when I got this exception.

Using Clob datatypes again instead of large varchar() because it seemed to provide better compaction after a checkpoint call.

To be honest I have not been able to reproduce it yet and I am 99% sure it is related to the checkpoint calls.  I am thinking this is just new to 1.4.183.
I have one application connection writing to the Clob fields and two applications / connections reading the clob values and eventually deleting them if necessary.

However here is the exception stack...  Any thoughts off the top of your head?

com.issinc.cds.sb.mfwd.impl.DataProcessReadException: java.io.IOException: org.h2.message.DbException: IO Exception: "java.io.IOException: java.lang.NullPointerException" [90028-183]
    at com.issinc.cds.sbsend.mfwd.proc.MessageForwardMessageRouter.saveImpl(MessageForwardMessageRouter.java:265)
    at com.issinc.cds.sbsend.mfwd.proc.MessageForwardMessageRouter.saveFinalizedFormat(MessageForwardMessageRouter.java:173)
    at com.issinc.cds.sbsend.mfwd.proc.MessageForwardMessageRouter.processRequest(MessageForwardMessageRouter.java:103)
    at com.issinc.cds.sbsend.input.poller.MessageForwardDirPollerRenamer$1.ProcessData(MessageForwardDirPollerRenamer.java:111)
    at com.issinc.cds.sb.mfwd.impl.FwdMsgQueueManager$4.runTask(FwdMsgQueueManager.java:450)
    at com.issinc.cds.sb.mfwd.impl.FwdMsgQueueManager.runQuery(FwdMsgQueueManager.java:806)
    at com.issinc.cds.sb.mfwd.impl.FwdMsgQueueManager.getMessage(FwdMsgQueueManager.java:419)
    at com.issinc.cds.sbsend.input.poller.MessageForwardDirPollerRenamer.rename(MessageForwardDirPollerRenamer.java:104)
    at org.sadun.util.polling.DirectoryPoller.runCycle(DirectoryPoller.java:1171)
    at org.sadun.util.polling.DirectoryPoller.run(DirectoryPoller.java:964)
    at com.issinc.cds.poller.CDSDirectoryPoller.run(CDSDirectoryPoller.java:85)
Caused by: java.io.IOException: org.h2.message.DbException: IO Exception: "java.io.IOException: java.lang.NullPointerException" [90028-183]
    at org.h2.message.DbException.convertToIOException(DbException.java:364)
    at org.h2.store.LobStorageRemoteInputStream.read(LobStorageRemoteInputStream.java:73)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
    at java.io.InputStreamReader.read(InputStreamReader.java:184)
    at java.io.BufferedReader.read1(BufferedReader.java:203)
    at java.io.BufferedReader.read(BufferedReader.java:279)
    at java.io.BufferedReader.fill(BufferedReader.java:154)
    at java.io.BufferedReader.read1(BufferedReader.java:205)
    at java.io.BufferedReader.read(BufferedReader.java:279)
    at java.io.Reader.read(Reader.java:140)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2001)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1980)
    at com.issinc.cds.sbsend.mfwd.proc.MessageForwardMessageRouter.saveImpl(MessageForwardMessageRouter.java:211)
    ... 10 more
Caused by: org.h2.message.DbException: IO Exception: "java.io.IOException: java.lang.NullPointerException" [90028-183]
    at org.h2.message.DbException.convert(DbException.java:283)
    at org.h2.engine.SessionRemote.done(SessionRemote.java:629)
    at org.h2.engine.SessionRemote.readLob(SessionRemote.java:779)
    at org.h2.store.LobStorageRemoteInputStream.read(LobStorageRemoteInputStream.java:71)
    ... 25 more
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: java.lang.NullPointerException" [90028-183]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:168)
    at org.h2.message.DbException.convert(DbException.java:287)
    at org.h2.server.TcpServerThread.sendError(TcpServerThread.java:221)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:161)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.lang.NullPointerException
    at org.h2.message.DbException.convertToIOException(DbException.java:364)
    at org.h2.util.IOUtils.readFully(IOUtils.java:338)
    at org.h2.server.TcpServerThread.process(TcpServerThread.java:462)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:159)
    ... 1 more
Caused by: java.lang.NullPointerException
    at org.h2.mvstore.StreamStore$Stream.nextBuffer(StreamStore.java:453)
    at org.h2.mvstore.StreamStore$Stream.read(StreamStore.java:414)
    at java.io.FilterInputStream.read(FilterInputStream.java:133)
    at org.h2.server.TcpServerThread$CachedInputStream.read(TcpServerThread.java:551)
    at org.h2.util.IOUtils.readFully(IOUtils.java:329)
    ... 3 more

    at org.h2.engine.SessionRemote.done(SessionRemote.java:622)
    ... 27 more

Thomas Mueller

unread,
Dec 17, 2014, 2:09:56 AM12/17/14
to h2-da...@googlegroups.com
Hi,

I'm not sure what the problem is. Do you have a test case (it doesn't have to be fully reproducible; it's enough if it fails once in a while).

Was this database created with version 1.4.183?

The problem could be that the blob is already removed while it is still reading. Usually (with a high retention time) this could still work, but with a retention time of 0 it might be a problem. But to me it sounds like a bug in H2 either case.

Regards,
Thomas


--
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 h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


 

Kenton Garner

unread,
Dec 17, 2014, 10:24:06 AM12/17/14
to h2-da...@googlegroups.com
I still have the database and the query that throws the exception.  Would that be of any help?

A test case will be harder to provide -  I would have to write a couple different applications that would simulate what my normal applications do and hope that it comes close to reproducing the issue.

Additional details....
When I run the query from the H2 Console it throws the null pointer exception as well but it adds the following details - "lob: null table: -3 id: 225814"

org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: java.lang.NullPointerException"; "lob: null table: -3 id: 225814" [90031-183]

    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:168)
    at org.h2.message.DbException.convertIOException(DbException.java:330)
    at org.h2.value.ValueLobDb.getString(ValueLobDb.java:302)
    at org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:284)
    at org.h2.server.web.WebApp.escapeData(WebApp.java:1773)
    at org.h2.server.web.WebApp.getResultSet(WebApp.java:1688)
    at org.h2.server.web.WebApp.getResult(WebApp.java:1407)
    at org.h2.server.web.WebApp.query(WebApp.java:1063)
    at org.h2.server.web.WebApp$1.next(WebApp.java:1025)
    at org.h2.server.web.WebApp$1.next(WebApp.java:1012)
    at org.h2.server.web.WebThread.process(WebThread.java:168)
    at org.h2.server.web.WebThread.run(WebThread.java:93)

    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.lang.NullPointerException
    at org.h2.message.DbException.convertToIOException(DbException.java:364)
    at org.h2.util.IOUtils.copyAndCloseInput(IOUtils.java:213)
    at org.h2.util.IOUtils.readStringAndClose(IOUtils.java:307)
    at org.h2.value.ValueLobDb.getString(ValueLobDb.java:292)
    ... 10 more

Caused by: java.lang.NullPointerException
    at org.h2.mvstore.StreamStore$Stream.nextBuffer(StreamStore.java:453)
    at org.h2.mvstore.StreamStore$Stream.read(StreamStore.java:414)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
    at java.io.InputStreamReader.read(InputStreamReader.java:184)
    at java.io.BufferedReader.fill(BufferedReader.java:154)
    at java.io.BufferedReader.read1(BufferedReader.java:205)
    at java.io.BufferedReader.read(BufferedReader.java:279)
    at org.h2.util.IOUtils.copyAndCloseInput(IOUtils.java:200)
    ... 12 more






--
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/N8QOE8c3AnY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.

Thomas Mueller

unread,
Dec 17, 2014, 10:39:03 AM12/17/14
to H2 Google Group
Hi,

Sure, if you could send me the database that would be great!

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages