[ https://issues.apache.org/jira/browse/DERBY-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17448814#comment-17448814 ]
Richard N. Hillegas commented on DERBY-7128: -------------------------------------------- A couple preliminary questions: 1) What JDBC calls do you use to serialize the BLOB into a column and to deserialize it out of the column? 2) You are reading the BLOB from a server. What happens if you read the BLOB using the embedded driver? Thanks, -Rick > ArrayIndexOutOfBoundsException: -1 thrown when calliing > BlobLocatorInputStream.read > ----------------------------------------------------------------------------------- > > Key: DERBY-7128 > URL: https://issues.apache.org/jira/browse/DERBY-7128 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.14.2.0 > Reporter: Eric Kaplan > Priority: Major > > We have seen this issue sporadically reading from a database table with a > column that is a BLOB. The exception is: > {code:java} > 0713 15:26:13,774 ERROR [main] java.lang.ArrayIndexOutOfBoundsException: -1 > 0713 15:26:13,774 ERROR [main] at > org.apache.derby.client.net.Request.popMark(Unknown Source) > 0713 15:26:13,774 ERROR [main] at > org.apache.derby.client.net.Request.popMarkForCachingPKGNAMCSN(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.net.NetPackageRequest.storePKGNAMCBytes(Unknown > Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.net.NetPackageRequest.buildPKGNAMCSN(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.net.NetStatementRequest.buildEXCSQLSTT(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.net.NetStatementRequest.writeExecuteCall(Unknown > Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.net.NetStatement.writeExecuteCall_(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.ClientStatement.writeExecuteCall(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.ClientPreparedStatement.flowExecute(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.ClientPreparedStatement.executeX(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.CallableLocatorProcedures.blobGetLength(Unknown > Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.ClientBlob.getLocatorLength(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.Lob.sqlLength(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.BlobLocatorInputStream.readBytes(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.BlobLocatorInputStream.read(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > java.io.BufferedInputStream.fill(BufferedInputStream.java:246) > 0713 15:26:13,775 ERROR [main] at > java.io.BufferedInputStream.read1(BufferedInputStream.java:286) > 0713 15:26:13,775 ERROR [main] at > java.io.BufferedInputStream.read(BufferedInputStream.java:345) > 0713 15:26:13,775 ERROR [main] at > java.io.FilterInputStream.read(FilterInputStream.java:133) > 0713 15:26:13,775 ERROR [main] at > org.apache.derby.client.am.CloseFilterInputStream.read(Unknown Source) > 0713 15:26:13,775 ERROR [main] at > java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2720) > 0713 15:26:13,775 ERROR [main] at > java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2736) > 0713 15:26:13,776 ERROR [main] at > java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3213) > 0713 15:26:13,776 ERROR [main] at > java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:896) > 0713 15:26:13,776 ERROR [main] at > java.io.ObjectInputStream.<init>(ObjectInputStream.java:358) > 0713 15:26:13,776 ERROR [main] at > com.armanta.ejb.SimpleJDBCAbstractionWithBlobs.getBlobColumnAsObject(SimpleJDBCAbstractionWithBlobs.java:163) > 0713 15:26:13,776 ERROR [main] at > com.armanta.ejb.SimpleJDBCAbstractionWithBlobs.getBlobColumnAsObjectRecogniseError(SimpleJDBCAbstractionWithBlobs.java:138) > 0713 15:26:13,776 ERROR [main] at > com.armanta.upgrade.Upgrade_6_0_8_4_BranchBlobs.processTable(Upgrade_6_0_8_4_BranchBlobs.java:84) > 0713 15:26:13,776 ERROR [main] at > com.armanta.upgrade.Upgrade_6_0_8_4_BranchBlobs.upgrade(Upgrade_6_0_8_4_BranchBlobs.java:57) > 0713 15:26:13,776 ERROR [main] at > com.armanta.upgrade.Upgrade.doIt(Upgrade.java:117) > 0713 15:26:13,776 ERROR [main] at > com.armanta.upgrade.Upgrade.main(Upgrade.java:50) > {code} > When this happens we are unable to read the blob from the table. -- This message was sent by Atlassian Jira (v8.20.1#820001)