org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement

GitHub | aeburriel | 2 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    UpdateImage with platform=Paravirtualization failed

    GitHub | 2 years ago | youyk
    rg.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.DataException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
  2. 0

    GitHub comment 14#270729416

    GitHub | 2 months ago | aeburriel
    org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
  3. 0

    GitHub comment 14#270729556

    GitHub | 2 months ago | aeburriel
    org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception when rolling back flows after failing to connect VR

    GitHub | 1 year ago | zxwing
    org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
  6. 0

    SQL0407:Null values not allowed in column or variable for JPA spring data insert operation

    Stack Overflow | 2 years ago | Nupin Pillai
    org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
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. org.postgresql.util.PSQLException

    ERROR: llave duplicada viola restricción de unicidad «par_butacas_uk» Detail: Ya existe la llave (sesion_id, localizacion_id, ( CASE WHEN fila IS NULL THEN (id + 1000)::character varying ELSE fila END), ( CASE WHEN numero IS NULL THEN (id + 1000)::character varying ELSE numero END), ( CASE WHEN anulada = true THEN id + 1000 ELSE 1 END))=(918, 2, 1, 3, 1).

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse()
  2. PostgreSQL JDBC Driver
    QueryExecutorImpl.execute
    1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    3 frames
  3. org.postgresql.jdbc
    PgPreparedStatement.executeUpdate
    1. org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    2. org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    3. org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    4. org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]
    4 frames
  4. c3p0:JDBC DataSources/Resource Pools
    NewProxyPreparedStatement.executeUpdate
    1. com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)[c3p0-0.9.1.1.jar:0.9.1.1]
    1 frame
  5. Hibernate
    SessionImpl.flush
    1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    2. org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    3. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    4. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    5. org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    6. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    7. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    8. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    9. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    10. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    10 frames
  6. org.hibernate.jpa
    AbstractEntityManagerImpl.flush
    1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    1 frame
  7. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)[na:na]
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_111]
    3. java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_111]
    3 frames
  8. Spring ORM
    SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
    1. org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:241)[spring-orm-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  9. com.sun.proxy
    $Proxy43.flush
    1. com.sun.proxy.$Proxy43.flush(Unknown Source)[na:na]
    1 frame
  10. es.uji.apps
    ButacasDAO$AjcClosure17.run
    1. es.uji.apps.par.dao.ButacasDAO.reservaButacas_aroundBody16(ButacasDAO.java:210)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    2. es.uji.apps.par.dao.ButacasDAO$AjcClosure17.run(ButacasDAO.java:1)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    2 frames
  11. Spring Aspects
    AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2. org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2 frames
  12. Spring Tx
    TransactionAspectSupport.invokeWithinTransaction
    1. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)[spring-tx-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  13. Spring Aspects
    AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  14. es.uji.apps
    ComprasService$AjcClosure3.run
    1. es.uji.apps.par.dao.ButacasDAO.reservaButacas(ButacasDAO.java:178)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    2. es.uji.apps.par.services.ComprasService.registraCompra_aroundBody2(ComprasService.java:121)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    3. es.uji.apps.par.services.ComprasService$AjcClosure3.run(ComprasService.java:1)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    3 frames
  15. Spring Aspects
    AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2. org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2 frames
  16. Spring Tx
    TransactionAspectSupport.invokeWithinTransaction
    1. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)[spring-tx-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  17. Spring Aspects
    AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  18. es.uji.apps
    ComprasService$AjcClosure5.run
    1. es.uji.apps.par.services.ComprasService.registraCompra(ComprasService.java:118)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    2. es.uji.apps.par.services.ComprasService.registraCompra_aroundBody4(ComprasService.java:151)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    3. es.uji.apps.par.services.ComprasService$AjcClosure5.run(ComprasService.java:1)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    3 frames
  19. Spring Aspects
    AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2. org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2 frames
  20. Spring Tx
    TransactionAspectSupport.invokeWithinTransaction
    1. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)[spring-tx-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  21. Spring Aspects
    AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  22. es.uji.apps
    ComprasService$AjcClosure1.run
    1. es.uji.apps.par.services.ComprasService.registraCompra(ComprasService.java:143)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    2. es.uji.apps.par.services.ComprasService.realizaCompraInternet_aroundBody0(ComprasService.java:93)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    3. es.uji.apps.par.services.ComprasService$AjcClosure1.run(ComprasService.java:1)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    3 frames
  23. Spring Aspects
    AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2. org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    2 frames
  24. Spring Tx
    TransactionAspectSupport.invokeWithinTransaction
    1. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)[spring-tx-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  25. Spring Aspects
    AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c
    1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)[spring-aspects-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    1 frame
  26. es.uji.apps
    EntradasResource.compraEntradaHtml
    1. es.uji.apps.par.services.ComprasService.realizaCompraInternet(ComprasService.java:70)[uji-par-base-0.0.12-SNAPSHOT.jar:na]
    2. es.uji.apps.par.services.rest.EntradasResource.compraEntradaNumeradaHtml(EntradasResource.java:281)[EntradasResource.class:na]
    3. es.uji.apps.par.services.rest.EntradasResource.compraEntradaHtml(EntradasResource.java:256)[EntradasResource.class:na]
    3 frames
  27. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor424.invoke(Unknown Source)[na:na]
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_111]
    3. java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_111]
    3 frames
  28. Jersey
    WebApplicationImpl.handleRequest
    1. com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)[jersey-server-1.17.1.jar:1.17.1]
    2. com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)[jersey-server-1.17.1.jar:1.17.1]
    3. com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)[jersey-server-1.17.1.jar:1.17.1]
    4. com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)[jersey-server-1.17.1.jar:1.17.1]
    5. com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)[jersey-server-1.17.1.jar:1.17.1]
    6. com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)[jersey-server-1.17.1.jar:1.17.1]
    7. com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)[jersey-server-1.17.1.jar:1.17.1]
    8. com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)[jersey-server-1.17.1.jar:1.17.1]
    9. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)[jersey-server-1.17.1.jar:1.17.1]
    10. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)[jersey-server-1.17.1.jar:1.17.1]
    11. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)[jersey-server-1.17.1.jar:1.17.1]
    12. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)[jersey-server-1.17.1.jar:1.17.1]
    12 frames
  29. Jersey
    ServletContainer.service
    1. com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)[jersey-servlet-1.17.1.jar:1.17.1]
    2. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)[jersey-servlet-1.17.1.jar:1.17.1]
    3. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)[jersey-servlet-1.17.1.jar:1.17.1]
    3 frames
  30. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)[tomcat-servlet-api-3.0.jar:na]
    1 frame
  31. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)[tomcat-catalina-7.0.56.jar:7.0.56]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[tomcat-catalina-7.0.56.jar:7.0.56]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)[tomcat-catalina-7.0.56.jar:7.0.56]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)[tomcat-catalina-7.0.56.jar:7.0.56]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)[tomcat-catalina-7.0.56.jar:7.0.56]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)[tomcat-catalina-7.0.56.jar:7.0.56]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)[tomcat-catalina-7.0.56.jar:7.0.56]
    8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)[tomcat-catalina-7.0.56.jar:7.0.56]
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)[tomcat-catalina-7.0.56.jar:7.0.56]
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)[tomcat-catalina-7.0.56.jar:7.0.56]
    10 frames
  32. org.apache.coyote
    AjpProcessor.process
    1. org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)[tomcat-coyote-7.0.56.jar:7.0.56]
    1 frame
  33. Grizzly HTTP
    JIoEndpoint$SocketProcessor.run
    1. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)[tomcat-coyote-7.0.56.jar:7.0.56]
    2. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)[tomcat-coyote-7.0.56.jar:7.0.56]
    2 frames
  34. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_111]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_111]
    2 frames
  35. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-coyote-7.0.56.jar:7.0.56]
    1 frame
  36. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.7.0_111]
    1 frame