org.hibernate.exception.GenericJDBCException: could not execute statement

Hibernate JIRA | Gail Badner | 1 year 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

    This is reproduced by org.hibernate.test.hql.BulkManipulationTest using PostgresPlusDialect. On the second multi-table delete in a transaction, the following exception is thrown: org.hibernate.exception.GenericJDBCException: could not execute statement at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) at org.hibernate.hql.spi.id.TableBasedDeleteHandlerImpl.execute(TableBasedDeleteHandlerImpl.java:122) at org.hibernate.hql.internal.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:44) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:429) at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:370) at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1290) at org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:102) at org.hibernate.test.hql.BulkManipulationTest$TestData.cleanup(BulkManipulationTest.java:1655) at org.hibernate.test.hql.BulkManipulationTest$TestData.access$200(BulkManipulationTest.java:1545) at org.hibernate.test.hql.BulkManipulationTest.testBooleanHandling(BulkManipulationTest.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: com.edb.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block at com.edb.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2663) at com.edb.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2279) at com.edb.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:545) at com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:610) at com.edb.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:438) at com.edb.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:384) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ... 21 more

    Hibernate JIRA | 1 year ago | Gail Badner
    org.hibernate.exception.GenericJDBCException: could not execute statement
  2. 0

    This is reproduced by org.hibernate.test.hql.BulkManipulationTest using PostgresPlusDialect. On the second multi-table delete in a transaction, the following exception is thrown: org.hibernate.exception.GenericJDBCException: could not execute statement at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) at org.hibernate.hql.spi.id.TableBasedDeleteHandlerImpl.execute(TableBasedDeleteHandlerImpl.java:122) at org.hibernate.hql.internal.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:44) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:429) at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:370) at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1290) at org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:102) at org.hibernate.test.hql.BulkManipulationTest$TestData.cleanup(BulkManipulationTest.java:1655) at org.hibernate.test.hql.BulkManipulationTest$TestData.access$200(BulkManipulationTest.java:1545) at org.hibernate.test.hql.BulkManipulationTest.testBooleanHandling(BulkManipulationTest.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: com.edb.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block at com.edb.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2663) at com.edb.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2279) at com.edb.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:545) at com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:610) at com.edb.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:438) at com.edb.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:384) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ... 21 more

    Hibernate JIRA | 1 year ago | Gail Badner
    org.hibernate.exception.GenericJDBCException: could not execute statement

    Root Cause Analysis

    1. com.edb.util.PSQLException

      ERROR: current transaction is aborted, commands ignored until end of transaction block

      at com.edb.core.v3.QueryExecutorImpl.receiveErrorResponse()
    2. com.edb.core
      QueryExecutorImpl.execute
      1. com.edb.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2663)
      2. com.edb.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2279)
      3. com.edb.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:545)
      3 frames
    3. com.edb.jdbc2
      AbstractJdbc2Statement.executeUpdate
      1. com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:610)
      2. com.edb.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:438)
      3. com.edb.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:384)
      3 frames
    4. Hibernate
      ResultSetReturnImpl.executeUpdate
      1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
      2. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
      2 frames
    5. org.hibernate.hql
      TableBasedDeleteHandlerImpl.execute
      1. org.hibernate.hql.spi.id.TableBasedDeleteHandlerImpl.execute(TableBasedDeleteHandlerImpl.java:122)
      1 frame
    6. Hibernate
      QueryImpl.executeUpdate
      1. org.hibernate.hql.internal.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:44)
      2. org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:429)
      3. org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:370)
      4. org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1290)
      5. org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:102)
      5 frames
    7. org.hibernate.test
      BulkManipulationTest.testBooleanHandling
      1. org.hibernate.test.hql.BulkManipulationTest$TestData.cleanup(BulkManipulationTest.java:1655)
      2. org.hibernate.test.hql.BulkManipulationTest$TestData.access$200(BulkManipulationTest.java:1545)
      3. org.hibernate.test.hql.BulkManipulationTest.testBooleanHandling(BulkManipulationTest.java:183)
      3 frames
    8. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3 frames
    9. JUnit
      FrameworkMethod.invokeExplosively
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      3 frames
    10. A Hibernate O/RM Module
      ExtendedFrameworkMethod.invokeExplosively
      1. org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
      1 frame
    11. JUnit
      FailOnTimeout$StatementThread.run
      1. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      2. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      3. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      4. org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
      4 frames