[ 
http://issues.apache.org/jira/browse/DERBY-1292?page=comments#action_12378169 ] 

Bryan Pendleton commented on DERBY-1292:
----------------------------------------

I was successfully able to reproduce your ClassCastException on the current 
trunk. Here's the stack trace from the current trunk, with line numbers:

java.lang.ClassCastException
        at 
org.apache.derby.client.net.NetStatementRequest.computeProtocolTypesAndLengths(NetStatementRequest.java:1204)
        at 
org.apache.derby.client.net.NetStatementRequest.buildSQLDTAcommandData(NetStatementRequest.java:518)
        at 
org.apache.derby.client.net.NetStatementRequest.writeExecute(NetStatementRequest.java:137)
        at 
org.apache.derby.client.net.NetPreparedStatement.writeExecute_(NetPreparedStatement.java:172)
        at 
org.apache.derby.client.am.PreparedStatement.writeExecute(PreparedStatement.java:1403)
        at 
org.apache.derby.client.am.PreparedStatement.executeBatchRequestX(PreparedStatement.java:1879)
        at 
org.apache.derby.client.am.PreparedStatement.executeBatchX(PreparedStatement.java:1798)
        at 
org.apache.derby.client.am.PreparedStatement.executeBatch(PreparedStatement.java:1256)
        at repro.doInserts(repro.java:74)
        at repro.main(repro.java:28)

Line 1204 of NetStatementRequest.java is this:

   java.sql.Clob c = (java.sql.Clob) inputRow[i];

Interestingly, I have to have *both* of the batch elements to make the bug 
happen. If I comment out either
the first group of 3 lines in the doInserts() try block, or if I comment out 
the second group of lines in the
doInserts() try block, the bug does not occur. It only occurs when *both* batch 
elements are present in
the batch.


> ClassCastException in ClientDriver when using CLOB columns and batch updates
> ----------------------------------------------------------------------------
>
>          Key: DERBY-1292
>          URL: http://issues.apache.org/jira/browse/DERBY-1292
>      Project: Derby
>         Type: Bug

>     Versions: 10.1.2.1
>     Reporter: Gerald Khin

>
> java.lang.ClassCastException: java.lang.String
>       at 
> org.apache.derby.client.net.NetStatementRequest.computeProtocolTypesAndLengths(Unknown
>  Source)
>       at 
> org.apache.derby.client.net.NetStatementRequest.buildSQLDTAcommandData(Unknown
>  Source)
>       at org.apache.derby.client.net.NetStatementRequest.writeExecute(Unknown 
> Source)
>       at 
> org.apache.derby.client.net.NetPreparedStatement.writeExecute_(Unknown Source)
>       at org.apache.derby.client.am.PreparedStatement.writeExecute(Unknown 
> Source)
>       at 
> org.apache.derby.client.am.PreparedStatement.executeBatchRequestX(Unknown 
> Source)
>       at org.apache.derby.client.am.PreparedStatement.executeBatchX(Unknown 
> Source)
>       at org.apache.derby.client.am.PreparedStatement.executeBatch(Unknown 
> Source)
>       at CCEBatchUpdateRepro.doInserts(CCEBatchUpdateRepro.java:71)
>       at CCEBatchUpdateRepro.main(CCEBatchUpdateRepro.java:27)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to