You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Benson Margulies (Created) (JIRA)" <ji...@apache.org> on 2011/10/18 20:07:10 UTC
[jira] [Created] (DERBY-5470) Intermittent NPE executing a prepared
statement inserting a blob.
Intermittent NPE executing a prepared statement inserting a blob.
-----------------------------------------------------------------
Key: DERBY-5470
URL: https://issues.apache.org/jira/browse/DERBY-5470
Project: Derby
Issue Type: Bug
Components: Store
Affects Versions: 10.8.1.2
Environment: Linux 64-bit, java 1.6 build 26.
Reporter: Benson Margulies
We cannot reproduce this consistently, let alone minimize it for you. However, the backtrace may be suggestive enough to give you some traction.
I have never been able to repro this on a Mac with the corresponding version of Java.
{noformat}
Caused by: java.lang.NullPointerException
at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:75)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at org.apache.derby.iapi.services.io.LimitInputStream.read(Unknown Source)
at org.apache.derby.iapi.types.RawToBinaryFormatStream.read(Unknown Source)
at org.apache.derby.impl.store.raw.data.MemByteHolder.write(Unknown Source)
at org.apache.derby.impl.store.raw.data.RememberBytesInputStream.fillBuf(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.logColumn(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.logRow(Unknown Source)
at org.apache.derby.impl.store.raw.data.InsertOperation.writeOptionalDataToBuffer(Unknown Source)
at org.apache.derby.impl.store.raw.data.InsertOperation.<init>(Unknown Source)
at org.apache.derby.impl.store.raw.data.LoggableActions.actionInsert(Unknown Source)
at org.apache.derby.impl.store.raw.data.BasePage.insertNoOverflow(Unknown Source)
at org.apache.derby.impl.store.raw.data.BasePage.insertAtSlot(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.insertAtSlot(Unknown Source)
at org.apache.derby.impl.store.raw.data.BasePage.insert(Unknown Source)
at org.apache.derby.impl.store.access.heap.HeapController.doInsert(Unknown Source)
at org.apache.derby.impl.store.access.heap.HeapController.insertAndFetchLocation(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (DERBY-5470) Intermittent NPE executing a
prepared statement inserting a blob.
Posted by "Kathey Marsden (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden resolved DERBY-5470.
-----------------------------------
Resolution: Invalid
resolving as invalid as this appears to be an issue with the stream set in the prepared statement parameter rather than an issue with Derby itself
> Intermittent NPE executing a prepared statement inserting a blob.
> -----------------------------------------------------------------
>
> Key: DERBY-5470
> URL: https://issues.apache.org/jira/browse/DERBY-5470
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.8.1.2
> Environment: Linux 64-bit, java 1.6 build 26.
> Reporter: Benson Margulies
>
> We cannot reproduce this consistently, let alone minimize it for you. However, the backtrace may be suggestive enough to give you some traction.
> I have never been able to repro this on a Mac with the corresponding version of Java.
> {noformat}
> Caused by: java.lang.NullPointerException
> at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:75)
> at java.io.FilterInputStream.read(FilterInputStream.java:116)
> at org.apache.derby.iapi.services.io.LimitInputStream.read(Unknown Source)
> at org.apache.derby.iapi.types.RawToBinaryFormatStream.read(Unknown Source)
> at org.apache.derby.impl.store.raw.data.MemByteHolder.write(Unknown Source)
> at org.apache.derby.impl.store.raw.data.RememberBytesInputStream.fillBuf(Unknown Source)
> at org.apache.derby.impl.store.raw.data.StoredPage.logColumn(Unknown Source)
> at org.apache.derby.impl.store.raw.data.StoredPage.logRow(Unknown Source)
> at org.apache.derby.impl.store.raw.data.InsertOperation.writeOptionalDataToBuffer(Unknown Source)
> at org.apache.derby.impl.store.raw.data.InsertOperation.<init>(Unknown Source)
> at org.apache.derby.impl.store.raw.data.LoggableActions.actionInsert(Unknown Source)
> at org.apache.derby.impl.store.raw.data.BasePage.insertNoOverflow(Unknown Source)
> at org.apache.derby.impl.store.raw.data.BasePage.insertAtSlot(Unknown Source)
> at org.apache.derby.impl.store.raw.data.StoredPage.insertAtSlot(Unknown Source)
> at org.apache.derby.impl.store.raw.data.BasePage.insert(Unknown Source)
> at org.apache.derby.impl.store.access.heap.HeapController.doInsert(Unknown Source)
> at org.apache.derby.impl.store.access.heap.HeapController.insertAndFetchLocation(Unknown Source)
> at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
> at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5470) Intermittent NPE executing a
prepared statement inserting a blob.
Posted by "Knut Anders Hatlen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130402#comment-13130402 ]
Knut Anders Hatlen commented on DERBY-5470:
-------------------------------------------
The NullPointerException is thrown by org.apache.commons.io.input.ProxyInputStream, which is not a Derby class. Assuming your version of the class looks something like this
http://svn.apache.org/viewvc/commons/proper/io/tags/commons-io-2.1/src/main/java/org/apache/commons/io/input/ProxyInputStream.java?view=markup
I think the NullPointerException happens because the underlying stream (the field "in") is null. I don't think there's any way Derby can set that field to null, so I would suspect that your application somehow passes null to ProxyInputStream's constructor.
If you modify the application class that overrides ProxyInputStream (assuming that's how you use it) and make its constructor throw a NullPointerException if the passed in stream is null, you might get a better indication of what's going wrong.
> Intermittent NPE executing a prepared statement inserting a blob.
> -----------------------------------------------------------------
>
> Key: DERBY-5470
> URL: https://issues.apache.org/jira/browse/DERBY-5470
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.8.1.2
> Environment: Linux 64-bit, java 1.6 build 26.
> Reporter: Benson Margulies
>
> We cannot reproduce this consistently, let alone minimize it for you. However, the backtrace may be suggestive enough to give you some traction.
> I have never been able to repro this on a Mac with the corresponding version of Java.
> {noformat}
> Caused by: java.lang.NullPointerException
> at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:75)
> at java.io.FilterInputStream.read(FilterInputStream.java:116)
> at org.apache.derby.iapi.services.io.LimitInputStream.read(Unknown Source)
> at org.apache.derby.iapi.types.RawToBinaryFormatStream.read(Unknown Source)
> at org.apache.derby.impl.store.raw.data.MemByteHolder.write(Unknown Source)
> at org.apache.derby.impl.store.raw.data.RememberBytesInputStream.fillBuf(Unknown Source)
> at org.apache.derby.impl.store.raw.data.StoredPage.logColumn(Unknown Source)
> at org.apache.derby.impl.store.raw.data.StoredPage.logRow(Unknown Source)
> at org.apache.derby.impl.store.raw.data.InsertOperation.writeOptionalDataToBuffer(Unknown Source)
> at org.apache.derby.impl.store.raw.data.InsertOperation.<init>(Unknown Source)
> at org.apache.derby.impl.store.raw.data.LoggableActions.actionInsert(Unknown Source)
> at org.apache.derby.impl.store.raw.data.BasePage.insertNoOverflow(Unknown Source)
> at org.apache.derby.impl.store.raw.data.BasePage.insertAtSlot(Unknown Source)
> at org.apache.derby.impl.store.raw.data.StoredPage.insertAtSlot(Unknown Source)
> at org.apache.derby.impl.store.raw.data.BasePage.insert(Unknown Source)
> at org.apache.derby.impl.store.access.heap.HeapController.doInsert(Unknown Source)
> at org.apache.derby.impl.store.access.heap.HeapController.insertAndFetchLocation(Unknown Source)
> at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
> at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira