Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange Duplicate Key Exception while working with WAS 6 and DB2

 
Gabbar singh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - I am using RAD with WAS 6.0, DB2 8.0 and Type 4 JDBC Driver.
I am trying to insert into tables. This works fine in some of our machines.
However in some others, with the same code, we get a Duplicate Key Eception - com.ibm.websphere.ce.cm.DuplicateKeyException: DB2JDBCSection Received Error in Method execute:SQLCODE==> -803

The strangest thing is that in these problem machines, if i do a debug and step through, inserts are fine. Also, if i insert one row through my GUI and wait for about 5 seconds and then do another insert also, it works fine. The problem (in the problem machines only) happenw when i insert a row through GUI and then immedeialy insert the next

Both machines have the same settings.

Any pointers are appreciated.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gabbar,
How are you creating the primary key?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic