Kathey Marsden wrote:
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.
Hi Kathey,
It occurs to me that maybe I didn't completely understand what you were asking,
but
I plugged your snippet of code into my current trunk build to see what would
happen.
With db2jcc as my driver, I still get a Distributed Protocol Exception using
your code.
With derbyclient as my driver, I get a Batch Update Exception, complaining about
invalid SQL in the batch.
Both behaviors seemed wrong to me, or at least worthy of further investigation,
so I filed DERBY-767 and attached the test program that I used (which is just
your
code snippet with a little bit more connection boilerplate around it).
thanks,
bryan
P.S. Here's the Batch update Exception:
Negative Statement: statement testing executeQuery in the middle of batch
Negative Statement: statement testing executeUpdate in the middle of batch
org.apache.derby.client.am.BatchUpdateException: Non-atomic batch failure. The
batch was submitted, but at least one exception occurred on an individual member
of the batch. Use getNextException() to retrieve the exceptions for specific ba
tched elements.
at org.apache.derby.client.am.Agent.endBatchedReadChain(Agent.java:267)
at
org.apache.derby.client.am.Statement.flowExecuteBatch(Statement.java:1751)
at
org.apache.derby.client.am.Statement.executeBatchX(Statement.java:798)
at org.apache.derby.client.am.Statement.executeBatch(Statement.java:778)
at repro.main(repro.java:53)
org.apache.derby.client.am.SqlException: Error for batch element #2: Invalid
SQL in Batch
at
org.apache.derby.client.am.Statement.checkForInvalidBatchedSql(Statement.java:1960)
at
org.apache.derby.client.am.Statement.flowExecuteBatch(Statement.java:1705)
at
org.apache.derby.client.am.Statement.executeBatchX(Statement.java:798)
at org.apache.derby.client.am.Statement.executeBatch(Statement.java:778)
at repro.main(repro.java:53)