Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
CFaisal
Post subject: Could not execute JDBC batch update  PostPosted: May 15, 2008 - 01:54 PM



Joined: May 15, 2008
Posts: 1

Hi ALL,

I run the Qtuickstart Hibernate Introduction tutorial successfully. But when i tried to run again, it started giving this error below.

Please help how to resolve this issue.


log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at com.myeclipse.hibernate.HibernateExample.addUser(HibernateExample.java:41)
at com.myeclipse.hibernate.HibernateExample.main(HibernateExample.java:12)
Caused by: java.sql.BatchUpdateException: Duplicate entry '1' for key 1
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:657)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
... 9 more
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: Could not execute JDBC batch update  PostPosted: May 15, 2008 - 04:33 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5662

Can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.

Can you switch to a new workspace and test this project again. Do you still face the same issue ?

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits