-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: "Duplicate entry for key 2" SQL
PostPosted: Wed Jan 28, 2004 3:57 pm 
Beginner
Beginner

Joined: Tue Jan 27, 2004 10:59 am
Posts: 24
Hi,

Getting this error running Hibernate database code.

2004-01-28 12:21:57,973 [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter - Invalid argument value, message from server: "Duplicate entry '22222' for key 2"
2004-01-28 12:21:58,014 [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter - Could not insert
java.sql.SQLException: Invalid argument value, message from server: "Duplicate entry '22222' for key 2"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)

Help appreciated.Thanks!


Top
 Profile  
 
 Post subject: Fixed
PostPosted: Wed Jan 28, 2004 5:41 pm 
Beginner
Beginner

Joined: Tue Jan 27, 2004 10:59 am
Posts: 24
It was because either a primary key or unique index defined on
the column that is trying to hold the value 'Extended Trip'..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2004 7:23 pm 
Newbie

Joined: Mon Apr 05, 2004 6:25 pm
Posts: 5
Hi Samy:

I met the same problem. Can you elaborate on your answer? I don't understand what "extended trip" means. But, I feel it's exactly what my problem is.

Thanks much!

Robert


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.