• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Primary Key Exception

 
ford Darcy Jr
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33674
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic