db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4102) Assert failure or ClassCastException in EmbedBlob when retrieving BLOB >= 32K
Date Thu, 19 Mar 2009 11:55:50 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-4102:
--------------------------------------

    Attachment: CastExc.java

Attached is a Java program that reproduces the bug.

With sane jars:

Exception in thread "main" java.sql.SQLException: Java exception: 'ASSERT FAILED: org.apache.derby.shared.common.sanity.AssertFailure'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
        at org.apache.derby.impl.jdbc.Util.javaException(Util.java:244)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2201)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
        at org.apache.derby.impl.jdbc.EmbedResultSet.getBlob(EmbedResultSet.java:4000)
        at CastExc.main(CastExc.java:12)
Caused by: java.sql.SQLException: Java exception: 'ASSERT FAILED: org.apache.derby.shared.common.sanity.AssertFailure'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
        ... 8 more
Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED
        at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:98)
        at org.apache.derby.impl.jdbc.EmbedBlob.<init>(EmbedBlob.java:194)
        at org.apache.derby.impl.jdbc.EmbedResultSet.getBlob(EmbedResultSet.java:3998)
        ... 1 more

With insane jars:

Exception in thread "main" java.sql.SQLException: Java exception: 'org.apache.derby.iapi.types.RawToBinaryFormatStream
cannot be cast to org.apache.derby.iapi.types.Resetable: java.lang.ClassCastException'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.getBlob(Unknown Source)
        at CastExc.main(CastExc.java:12)
Caused by: java.sql.SQLException: Java exception: 'org.apache.derby.iapi.types.RawToBinaryFormatStream
cannot be cast to org.apache.derby.iapi.types.Resetable: java.lang.ClassCastException'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
        ... 9 more
Caused by: java.lang.ClassCastException: org.apache.derby.iapi.types.RawToBinaryFormatStream
cannot be cast to org.apache.derby.iapi.types.Resetable
        at org.apache.derby.impl.jdbc.PositionedStoreStream.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedBlob.<init>(Unknown Source)
        ... 2 more

> Assert failure or ClassCastException in EmbedBlob when retrieving BLOB >= 32K
> -----------------------------------------------------------------------------
>
>                 Key: DERBY-4102
>                 URL: https://issues.apache.org/jira/browse/DERBY-4102
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.1.0, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.0.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>         Attachments: CastExc.java
>
>
> The code below results in an assert error (with sane jars) or a ClassCastException (with
insane jars):
>         PreparedStatement ps = c.prepareStatement("values cast(? as blob)");
>         int len = 32 * 1024;
>         ps.setBinaryStream(1, new ByteArrayInputStream(new byte[len]), len);
>         ResultSet rs = ps.executeQuery();
>         while (rs.next()) {
>             rs.getBlob(1);
>         }
> If len < 32K there is no error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message