junit.framework.AssertionFailedError: Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException>

Hibernate JIRA | Martin Šimka | 4 years 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

    Error message: {quote} Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException> {quote} Stacktrace: {noformat} junit.framework.AssertionFailedError: Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException> at org.hibernate.test.exception.SQLExceptionConversionTest.testIntegrityViolation(SQLExceptionConversionTest.java:65) at org.hibernate.junit.functional.FunctionalTestCase.runTest(FunctionalTestCase.java:124) at org.hibernate.junit.UnitTestCase.runBare(UnitTestCase.java:64) at org.hibernate.junit.functional.FunctionalTestClassTestSuite.runTest(FunctionalTestClassTestSuite.java:115) at org.hibernate.junit.functional.FunctionalTestClassTestSuite.run(FunctionalTestClassTestSuite.java:84) {noformat} https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap5-hibernate-core-test-matrix-hpux/BITS=-d64,database=postgresql91,jdbc=jdbc4,jdk=jdk17_hpux,label=hpux11v3/lastCompletedBuild/testReport/org.hibernate.test.exception/SQLExceptionConversionTest/testIntegrityViolation/ it doesn't happen with jdk16

    Hibernate JIRA | 4 years ago | Martin Šimka
    junit.framework.AssertionFailedError: Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException>
  2. 0

    Error message: {quote} Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException> {quote} Stacktrace: {noformat} junit.framework.AssertionFailedError: Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException> at org.hibernate.test.exception.SQLExceptionConversionTest.testIntegrityViolation(SQLExceptionConversionTest.java:65) at org.hibernate.junit.functional.FunctionalTestCase.runTest(FunctionalTestCase.java:124) at org.hibernate.junit.UnitTestCase.runBare(UnitTestCase.java:64) at org.hibernate.junit.functional.FunctionalTestClassTestSuite.runTest(FunctionalTestClassTestSuite.java:115) at org.hibernate.junit.functional.FunctionalTestClassTestSuite.run(FunctionalTestClassTestSuite.java:84) {noformat} https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap5-hibernate-core-test-matrix-hpux/BITS=-d64,database=postgresql91,jdbc=jdbc4,jdk=jdk17_hpux,label=hpux11v3/lastCompletedBuild/testReport/org.hibernate.test.exception/SQLExceptionConversionTest/testIntegrityViolation/ it doesn't happen with jdk16

    Hibernate JIRA | 4 years ago | Martin Šimka
    junit.framework.AssertionFailedError: Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException>

    Root Cause Analysis

    1. junit.framework.AssertionFailedError

      Bad conversion [ERROR: current transaction is aborted, commands ignored until end of transaction block] expected:<class org.hibernate.exception.ConstraintViolationException> but was:<class org.hibernate.exception.GenericJDBCException>

      at org.hibernate.test.exception.SQLExceptionConversionTest.testIntegrityViolation()
    2. org.hibernate.test
      SQLExceptionConversionTest.testIntegrityViolation
      1. org.hibernate.test.exception.SQLExceptionConversionTest.testIntegrityViolation(SQLExceptionConversionTest.java:65)
      1 frame
    3. org.hibernate.junit
      FunctionalTestClassTestSuite.run
      1. org.hibernate.junit.functional.FunctionalTestCase.runTest(FunctionalTestCase.java:124)
      2. org.hibernate.junit.UnitTestCase.runBare(UnitTestCase.java:64)
      3. org.hibernate.junit.functional.FunctionalTestClassTestSuite.runTest(FunctionalTestClassTestSuite.java:115)
      4. org.hibernate.junit.functional.FunctionalTestClassTestSuite.run(FunctionalTestClassTestSuite.java:84)
      4 frames