-->
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.  [ 1 post ] 
Author Message
 Post subject: while updating the data iam getting error
PostPosted: Sat Dec 27, 2008 7:58 am 
Newbie

Joined: Fri Dec 26, 2008 6:01 am
Posts: 6
I want to update the data using spring--hibernate. but iam getting error saying

[2008-22-26 03:22]DEBUG[http-80-Processor24](NewPooledConnection.java:363) - com.mchange.v2.c3p0.impl.NewPooledConnection@10da1d8 handling a throwable.
java.sql.BatchUpdateException: Duplicate entry 'ff8080811b775f70011b776d270b0001' for key 2
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)



[2008-22-26 03:22]DEBUG[http-80-Processor24](SqlUtils.java:85) - Attempted to convert SQLException to SQLException. Leaving it alone. [SQLState: 23000; errorCode: 1062]
java.sql.BatchUpdateException: Duplicate entry 'ff8080811b775f70011b776d270b0001' for key 2
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)



[2008-22-26 03:22]DEBUG[http-80-Processor24](DefaultConnectionTester.java:126) - Testing a Connection in response to an Exception:
java.sql.BatchUpdateException: Duplicate entry 'ff8080811b775f70011b776d270b0001' for key 2
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)




[2008-22-26 03:22]DEBUG[http-80-Processor24](JDBCExceptionReporter.java:63) - Could not execute JDBC batch update [insert into TDesiredPosition (authorizedToWork, employmentStatus, roles, jobTitle, desiredJobType, desiredLocation, relocate, desiredSalary_lacs, desiredSalary_thousands, usWorkStatus, user_id, notice_period, desiredId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
java.sql.BatchUpdateException: Duplicate entry 'ff8080811b775f70011b776d270b0001' for key 2
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)

I know that the existing record is same but i want to update the same record with particular fields that got changed. how to write the xdoclets in hibernate for updating the existing record.


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

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.