reset password
Author Message
poonam31
Posts: 35
Posted 02:13 Jul 28, 2015 |

Hello Dr. Sun,

When I enter user info on jsp page and click on submit, the user info should be saved to db.

But, when I click on submit, its giving me an exception for duplicate primary key, since it is creating the record to save with the primary key 1(which already exists, In my db, I have 7 records in user table). Also, When I stop and run my application again, next time it creates the next id value. 

I googled and checked the possible things for exception, couden't resolve this issue. Could you please tell what might be  the issue?

attached the exception details

 

Thanks

 

 

 

Attachments:
apatel42
Posts: 1
Posted 02:21 Jul 28, 2015 |

create sequence hibernate_sequence minvalue 100;

Use this during creating hibernate sequence. This would might be solve your problem.

poonam31
Posts: 35
Posted 12:42 Jul 28, 2015 |
apatel42 wrote:

create sequence hibernate_sequence minvalue 100;

Use this during creating hibernate sequence. This would might be solve your problem.

Hey Thanks :) :)

This resolved my issue. Thank u very much :)