org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

coderanch.com | 4 weeks ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Spring + Hibernate Integration Example

    howtodoinjava.com | 1 year ago
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  2. 0

    Spring + Hibernate Integration Example

    howtodoinjava.com | 5 days ago
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  3. 0

    Topic: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update | www.jguru.com

    jguru.com | 1 year ago
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at .hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Help!After replacing H2 to mysql,getting errors... | JBoss Developer

    jboss.org | 2 years ago
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  6. 0

    catching org.hibernate.exception.ConstraintViolationException

    Stack Overflow | 3 years ago | fady taher
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

  1. DoktorDoener666 7 times, last 2 months ago
  2. chenjunjun 3 times, last 2 months ago
  3. mauritius 1 times, last 3 months ago
  4. MoYapro 2 times, last 3 months ago
  5. Kialandei 1 times, last 4 months ago
9 more registered users
45 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

    Cannot delete or update a parent row: a foreign key constraint fails (`dac_bd4`.`item`, CONSTRAINT `FK317B1335EE5A98` FOREIGN KEY (`IDDIVISION`) REFERENCES `division` (`IDDIVISION`))

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    4. java.lang.reflect.Constructor.newInstance(Unknown Source)
    4 frames
  3. MySQL jdbc
    PreparedStatement.executeBatch
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2. com.mysql.jdbc.Util.getInstance(Util.java:382)
    3. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
    4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)
    5. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)
    6. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)
    7. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)
    8. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    9. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
    10. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
    11. com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1976)
    12. com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
    12 frames
  4. Commons DBCP
    DelegatingStatement.executeBatch
    1. org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
    1 frame
  5. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
    2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
    4. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
    4 frames
  6. Hibernate
    SessionImpl.managedFlush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
    4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
    4 frames
  7. Hibernate
    JDBCTransaction.commit
    1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    1 frame
  8. Hibernate
    HibernateTransactionManager.doCommit
    1. org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
    1 frame
  9. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
    2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
    3. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
    4. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
    4 frames
  10. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  11. Unknown
    $Proxy32.supprimer
    1. $Proxy32.supprimer(Unknown Source)
    1 frame
  12. Dac.View
    DivisionBean.delete
    1. Dac.View.DivisionBean.delete(DivisionBean.java:209)
    1 frame
  13. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  14. Pax Jsp
    MethodExpressionImpl.invoke
    1. org.apache.el.parser.AstValue.invoke(AstValue.java:264)
    2. org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
    2 frames
  15. JSF
    TagMethodExpression.invoke
    1. com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    1 frame
  16. JavaEE 7
    MethodBindingMethodExpressionAdapter.invoke
    1. javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    1 frame
  17. JSF
    ActionListenerImpl.processAction
    1. com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    1 frame
  18. JavaEE 7
    UIViewRoot.processApplication
    1. javax.faces.component.UICommand.broadcast(UICommand.java:315)
    2. javax.faces.component.UIData.broadcast(UIData.java:1093)
    3. javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    4. javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    4 frames
  19. JSF
    LifecycleImpl.execute
    1. com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    3 frames
  20. JavaEE 7
    FacesServlet.service
    1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    1 frame
  21. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    2 frames
  22. primefaces
    FileUploadFilter.doFilter
    1. org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    1 frame
  23. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    10 frames
  24. Grizzly HTTP
    JIoEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    3 frames
  25. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    3. java.lang.Thread.run(Unknown Source)
    3 frames