db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Anyone have time to test out a possible client bug?
Date Thu, 15 Dec 2005 21:26:36 GMT
I have been sitting on this issue for a long time. It was filed against an older version 
of Cloudscape  with JCC. I would appreciate if someone could check and see if it is an 
issue with Network Client with the trunk and file a Jira issue if it is. 
Otherwise I'll sit on it a while longer #:)




Distributed Protocol Error occurs when calling executeUpdate() 
after an addBatch()

FAIL -- unexpected exception 
com.ibm.db2.jcc.c.DisconnectException: Execution failed due to 
a distribution protocol error that caused deallocation of the 
conversation.  A DRDA Data Stream Syntax Error was detected.  
Reason: 0x2113 sqlstate: 58009 instead of XJ068

Execution failed because of a Distributed Protocol Error:  
DRDA_Proto_SYNTAXRM; CODPNT arg  = 2113;
Error Code Value = 14
com.ibm.db2j.drda.DRDAProtocolException
        at 
com.ibm.db2j.drda.DRDAConnThread.throwSyntaxrm(DRDAConnThread.ja
va:400)
        at 
com.ibm.db2j.drda.DRDAConnThread.invalidValue(DRDAConnThread.jav
a:6486)
        at 
com.ibm.db2j.drda.DRDAConnThread.parseCLSQRY(DRDAConnThread.java
:4736)
        at 
com.ibm.db2j.drda.DRDAConnThread.processCommands(DRDAConnThread.
java:783)
        at 
com.ibm.db2j.drda.DRDAConnThread.run(DRDAConnThread.java:233)

try
{
  // trying executeQuery after addBatch
  // if this test for executeQuery is taken out, then the
  // protocol exception does not get thrown
  System.out.println("Negative Statement: statement testing 
executeQuery in the middle of batch");
  stmt.addBatch("insert into t1 values(1)");
  stmt.executeQuery("SELECT * FROM SYS.SYSTABLES");
  updateCount = stmt.executeBatch();
  passed = false;
} catch (SQLException sqle) {
  /* Check to be sure the exception is the MIDDLE_OF_BATCH */
  passed = passed && checkException(sqle, "XJ068",null);
  if (checkException(sqle, "XJ068",null))
    stmt.clearBatch();
}

try
{
  // trying executeUpdate after addBatch
  System.out.println("Negative Statement: statement testing 
executeUpdate in the middle of batch");
  // if the stmt = conn.createStatement(); is uncommented
  // the protocol exception does not get thrown
  // stmt = conn.createStatement();
  stmt.addBatch("insert into t1 values(1)");
  stmt.executeUpdate("insert into t1 values(1)");
  stmt.addBatch("insert into t1 values(1)");
  stmt.addBatch("SELECT * FROM SYS.SYSCOLUMNS");
  updateCount = stmt.executeBatch();
  passed = false;
} catch (SQLException sqle) {
  /* Check to be sure the exception is the MIDDLE_OF_BATCH */
  passed = passed && checkException(sqle, "XJ068",null);
  if (checkException(sqle, "XJ068",null))
    stmt.clearBatch();
}
  stmt.executeUpdate("delete from t1");
  conn.commit();





Mime
View raw message