Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    via stackoverflow.com by Unknown author

    Upgrade the database driver to the latest and check.

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.3-1101-jdbc41</version>
    </dependency>
    

    Replace version with the latest driver version.

  2. ,
    Expert tip

    Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Solutions on the web

via GitHub by aeburriel
, 1 year ago
org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
via GitHub by aeburriel
, 1 year ago
org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
via GitHub by koelnconcert
, 8 months ago
org.hibernate.exception.GenericJDBCException: could not execute update query; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute update query
via nabble.com by Unknown author, 1 year ago
nested exception is <openjpa-1.0.0-r420667:568756 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: null
via GitHub by zxwing
, 2 years ago
org.hibernate.exception.ConstraintViolationException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
via GitHub by srinivaschannakeshava
, 9 months ago
, last_modified_at, last_modified_by, name, optlock_revision FROM sp_distribution_set_type WHERE ((id = ?) AND (tenant = ?))"); nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-6174] (Eclipse Persistence Services
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(QueryExecutorImpl.java:2455)	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)	at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)	at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)	at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335)	at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:241)	at com.sun.proxy.$Proxy43.flush(Unknown Source)	at es.uji.apps.par.dao.ButacasDAO.reservaButacas_aroundBody16(ButacasDAO.java:210)	at es.uji.apps.par.dao.ButacasDAO$AjcClosure17.run(ButacasDAO.java:1)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)	at es.uji.apps.par.dao.ButacasDAO.reservaButacas(ButacasDAO.java:178)	at es.uji.apps.par.services.ComprasService.registraCompra_aroundBody2(ComprasService.java:121)	at es.uji.apps.par.services.ComprasService$AjcClosure3.run(ComprasService.java:1)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)	at es.uji.apps.par.services.ComprasService.registraCompra(ComprasService.java:118)	at es.uji.apps.par.services.ComprasService.registraCompra_aroundBody4(ComprasService.java:151)	at es.uji.apps.par.services.ComprasService$AjcClosure5.run(ComprasService.java:1)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)	at es.uji.apps.par.services.ComprasService.registraCompra(ComprasService.java:143)	at es.uji.apps.par.services.ComprasService.realizaCompraInternet_aroundBody0(ComprasService.java:93)	at es.uji.apps.par.services.ComprasService$AjcClosure1.run(ComprasService.java:1)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:59)	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:65)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)	at es.uji.apps.par.services.ComprasService.realizaCompraInternet(ComprasService.java:70)	at es.uji.apps.par.services.rest.EntradasResource.compraEntradaNumeradaHtml(EntradasResource.java:281)	at es.uji.apps.par.services.rest.EntradasResource.compraEntradaHtml(EntradasResource.java:256)	at sun.reflect.GeneratedMethodAccessor424.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	at java.lang.Thread.run(Thread.java:745)