hi
 
sometimes i get a Connection reset (i'm also investigating why this happens but i think i've found a problem with derby) when calling a remote derby db. the connection is closed but the transaction is still in progress (see last table at the bottom of the mail).
 
is this a known issue?
 
fabian
 
 
the statement was (buffer is a byte[], length 200k) and i executed it 6 times in a batch:
insert into DBFileBuffer (version, createdBy, lastUpdatedBy, lastUpdated, dbfile_id, deleted, buffer, id) values (?, ?, ?, ?, ?, ?, ?, ?)
 
this is what i see in the derby log:
 
org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because of a Distributed Protocol Error:  DRDA_Disconnect; CODPNT arg  = 0; Error Code
 Value = 0,DDMReader.fill(),InputStream.read(),Connection reset,*
        at org.apache.derby.impl.drda.DRDAProtocolException.newDisconnectException(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.markCommunicationsFailure(Unknown Source)
        at org.apache.derby.impl.drda.DDMReader.fill(Unknown Source)
        at org.apache.derby.impl.drda.DDMReader.ensureALayerDataInBuffer(Unknown Source)
        at org.apache.derby.impl.drda.DDMReader.readLOBChunk(Unknown Source)
        at org.apache.derby.impl.drda.DDMReader.readLOBContinuationStream(Unknown Source)
        at org.apache.derby.impl.drda.EXTDTAReaderInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(FilterInputStream.java:111)
        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.logLongColumn(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.insertLongColumn(Unknown Source)
        at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BasePage.updateAtSlot(Unknown Source)
        at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(Unknown Source)
        at org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(Unknown Source)
        at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown Source)
        at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
and when i check for locks, i get:
 
58760 APP UserTransaction ACTIVE (8,511980) insert into DBFileBuffer (version, createdBy, lastUpdatedBy, lastUpdated, dbfile_id, deleted, buffer, id) values (?, ?, ?, ?, ?, ?, ?, ?)
58854 APP UserTransaction ACTIVE SELECT * FROM NEW org.apache.derby.diag.TransactionTable() AS LT
58858 APP UserTransaction ACTIVE
58859 APP UserTransaction IDLE
58860 APP UserTransaction IDLE
58876 APP UserTransaction IDLE
58877 APP UserTransaction IDLE
58879 APP UserTransaction IDLE
58880 APP UserTransaction IDLE