[
https://issues.apache.org/jira/browse/DERBY-4337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739724#action_12739724
]
Kristian Waagan commented on DERBY-4337:
----------------------------------------
Brett wrote (04/Aug/09 08:41 PM above):
-----
The first thread (thread:Idle-3) performs in INSERT into the 'tool_details'
table (including two CLOBS) using setCharacterStream(). I don't really
understand the output fully, as there is also a logged call for
getCharacterStream() -- why this is needed on an insert I am not sure.
-----
This is because Derby creates a Clob object to accommodate the transfer.
The Clob takes the user stream as input, and then Derby retrieves the stream
from the newly created Clob when moving the data to the server - hence the call
to getCharacterStream().
According to the trace, one of the Clobs had a length of zero characters,
resulting in no call to getCharacterStream.
> DRDA regression in LOB retrieval between 10.3.2.1 -> 10.4.2.0 (and beyond)
> --------------------------------------------------------------------------
>
> Key: DERBY-4337
> URL: https://issues.apache.org/jira/browse/DERBY-4337
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.4.1.3, 10.4.2.0, 10.5.1.1
> Environment: WIndows XP, Mac OS X, Bitronix JTA 1.3, Hibernate 3.3
> Reporter: Brett Wooldridge
> Attachments: client_trace.log, derby.log, derby.log, full_trace.log,
> protocol-events.log, Server2.trace
>
>
> This bug was created after discussions on the developer mailing list, which
> can be found here:
> http://www.nabble.com/Derby-10.5.1.1-regression-tt24733315.html#a24733315
> In short summary, in an environment involving JTA, Derby, and connection
> pooling we are experiencing a failure retrieving a CLOB.
> To answer some of the questions and suggestions raised:
> 1. After switching to the EmbeddedXADataSource, the problem goes away. This
> is not a "workaround" for me, but is diagnostic of the issue.
> 2. After downgrading from 10.5.1.1 -> 10.4.2.0, the problem still occurs. So
> the "regression" is between 10.3.2.1 and 10.4.2.0.
> 3. I have built 10.5.2.0, the problem still occurs.
> Execution failed because of a Distributed Protocol Error:
> DRDA_Proto_CMDNSPRM; CODPNT arg = 2414; Error Code Value = 0
> org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because of
> a Distributed Protocol Error: DRDA_Proto_CMDNSPRM; CODPNT arg = 2414; Error
> Code Value = 0
> at
> org.apache.derby.impl.drda.DRDAConnThread.codePointNotSupported(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> Execution failed because of a Distributed Protocol Error:
> DRDA_Proto_CMDNSPRM; CODPNT arg = 2414; Error Code Value = 0
> org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because of
> a Distributed Protocol Error: DRDA_Proto_CMDNSPRM; CODPNT arg = 2414; Error
> Code Value = 0
> at
> org.apache.derby.impl.drda.DRDAConnThread.codePointNotSupported(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> An IOException was thrown when reading a 'java.sql.String' from an
> InputStream.
> java.sql.SQLException: An IOException was thrown when reading a
> 'java.sql.String' from an InputStream.
> at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
> at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(Unknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.transferParameters(Unknown
> Source)
> at
> org.apache.derby.jdbc.XAStatementControl.getRealPreparedStatement(Unknown
> Source)
> at
> org.apache.derby.iapi.jdbc.BrokeredPreparedStatement.getPreparedStatement(Unknown
> Source)
> at
> org.apache.derby.iapi.jdbc.BrokeredPreparedStatement.getStatement(Unknown
> Source)
> at org.apache.derby.iapi.jdbc.BrokeredStatement.close(Unknown Source)
> at org.apache.derby.impl.drda.DRDAStatement.close(Unknown Source)
> at org.apache.derby.impl.drda.Database.close(Unknown Source)
> at org.apache.derby.impl.drda.Session.close(Unknown Source)
> at org.apache.derby.impl.drda.DRDAConnThread.closeSession(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.handleException(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> Caused by: java.sql.SQLException: Java exception: 'Stream has already been
> read and end-of-file reached and cannot be re-used.: java.io.EOFException'.
> at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.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)
> ... 13 more
> Caused by: java.io.EOFException: Stream has already been read and end-of-file
> reached and cannot be re-used.
> at org.apache.derby.iapi.types.ReaderToUTF8Stream.read(Unknown Source)
> at java.io.DataInputStream.read(DataInputStream.java:80)
> at org.apache.derby.iapi.types.SQLClob.readExternal(Unknown Source)
> at org.apache.derby.iapi.types.SQLChar.getString(Unknown Source)
> at org.apache.derby.iapi.types.SQLChar.setFrom(Unknown Source)
> at org.apache.derby.iapi.types.DataType.setValue(Unknown Source)
> at
> org.apache.derby.impl.sql.GenericParameterValueSet.transferDataValues(Unknown
> Source)
> at
> org.apache.derby.impl.sql.execute.BaseActivation.setParameters(Unknown Source)
> at
> org.apache.derby.impl.sql.GenericActivationHolder.setParameters(Unknown
> Source)
> ... 11 more
> Execution failed because of Permanent Agent Error: SVRCOD = 40; RDBNAM =
> ziptie; diagnostic msg = An IOException was thrown when reading a
> 'java.sql.String' from an InputStream.
> org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because of
> Permanent Agent Error: SVRCOD = 40; RDBNAM = ziptie; diagnostic msg = An
> IOException was thrown when reading a 'java.sql.String' from an InputStream.
> at
> org.apache.derby.impl.drda.DRDAProtocolException.newAgentError(Unknown Source)
> at
> org.apache.derby.impl.drda.DRDAConnThread.sendUnexpectedException(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.closeSession(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.handleException(Unknown
> Source)
> at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.