-->
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.  [ 2 posts ] 
Author Message
 Post subject: Error when running hibernate batch update
PostPosted: Thu Feb 05, 2004 6:52 am 
Newbie

Joined: Thu Feb 05, 2004 2:24 am
Posts: 1
Hi, everyone!

It frequently happens the following errors of my system.
Platform:
Tomcat 5.0+Hibernate2.0.2+mysql4.0.16

The errors information are as following(part of loging errors)
:
13:08:28,184 WARN JDBCExceptionReporter:38 - SQL Error: 1062, SQLState:
S1009
13:08:28,185 ERROR JDBCExceptionReporter:46 - Invalid argument value,
message from server: "Duplicate entry 'liuhengyange@sohu.com' for key 2"
13:08:28,186 WARN JDBCExceptionReporter:38 - SQL Error: 1062, SQLState:
S1009
13:08:28,187 ERROR JDBCExceptionReporter:46 - Invalid argument value,
message from server: "Duplicate entry 'liuhengyange@sohu.com' for key 2"
13:08:28,188 ERROR JDBCExceptionReporter:38 - Could not execute JDBC batch
update
java.sql.BatchUpdateException: Invalid argument value, message from server:
"Duplicate entry 'liuhengyange@sohu.com' for key 2"
at
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1469)
at
net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54
)
at
net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
at
net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
at com.efn.DB.DAO.BaseDAO.saveObj(BaseDAO.java:333)
at com.efn.DB.DAO.UserDAO.saveUser(UserDAO.java:14)
at com.efn.Engine.UserManager.addUser(UserManager.java:148)
at
com.efn.web.user.actions.regsteponeAction.reg(regsteponeAction.java:97)
at
com.efn.web.user.actions.regsteponeAction.execute(regsteponeAction.java:57)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces

Any help will be much appreciated!!!

George


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2004 8:11 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Your column has a unique constraint. So inserting the same value twice will fail.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.