This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Primary Key Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Primary Key Exception" Watch "Primary Key Exception" New topic
Author

Primary Key Exception

ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Hi,

I have an insert application, which has a primary key column. If any primary key exceptions are encountered, its been caught in the try-catch block. But, whenever I get any primary key exceptions, I need to restart my webserver to continue inserting the record. Is there any solution for this, without the webserver restart.

Thanks.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Don't know if this is a JDBC problem, or a problem with a particular app server, but either way, it sure ain't a Java Beginner's problem. I'm going to move this to JDBC.


[Jess in Action][AskingGoodQuestions]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

Ford,
This is probably the application or the app server (not the web server.) What app server are you using?

Are you using auto-commit or transactions? You may have a lock in use.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
jQuery in Action, 2nd edition
 
subject: Primary Key Exception
 
Similar Threads
About ejbPostCreate
hibernate mapping xml issue.
Primary key problem
PLS Answer as soon as possible( Have a demo on monday) PLSSsss
Primary key and update method strange issue