This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Strange Duplicate  Key Exception while working with WAS 6 and DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Strange Duplicate  Key Exception while working with WAS 6 and DB2" Watch "Strange Duplicate  Key Exception while working with WAS 6 and DB2" New topic
Author

Strange Duplicate Key Exception while working with WAS 6 and DB2

Gabbar singh
Greenhorn

Joined: Nov 23, 2007
Posts: 11
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

Joined: May 26, 2003
Posts: 32507
    
214

Gabbar,
How are you creating the primary key?


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange Duplicate Key Exception while working with WAS 6 and DB2
 
It's not a secret anymore!