Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1839

TestXMLCustomerOrder failed against Oracle with "ORA-01461: can bind a LONG value only for insert into a LONG column"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.0, 2.0.1
    • 2.0.2, 2.1.0
    • jdbc
    • None

    Description

      A few junit tests failed with exception similar to the following stack.

      30500 test TRACE [main] openjpa.Runtime - An exception occurred while ending the transaction. This exception will be re-thrown.
      <openjpa-2.1.0-SNAPSHOT-r422266:1022129 fatal store error> org.apache.openjpa.util.StoreException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
      FailedObject: org.apache.openjpa.persistence.xmlmapping.entities.Order@16c616c6
      at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2311)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2149)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2046)
      at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1964)
      at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
      at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1488)
      at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
      at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:86)
      at junit.framework.TestCase.runBare(TestCase.java:125)
      at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:562)
      at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:538)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: <openjpa-2.1.0-SNAPSHOT-r422266:1022129 fatal store error> org.apache.openjpa.util.LockException: Unable to obtain an object lock on "org.apache.openjpa.persistence.xmlmapping.entities.Order@16c616c6".
      FailedObject: org.apache.openjpa.persistence.xmlmapping.entities.Order@16c616c6
      at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4851)
      at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:137)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
      at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:217)
      at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:738)
      at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
      ... 24 more
      Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-01461: can bind a LONG value only for insert into a LONG column

      {prepstmnt 1578655256 INSERT INTO TORDERXML (oid, amount, delivered, shipAddress, version, CUSTOMER_COUNTRYCODE, CUSTOMER_ID) VALUES (?, ?, ?, XMLType(?), ?, ?, ?) [params=?, ?, ?, ?, ?, ?, ?]}

      [code=1461, state=72000]
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:274)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:262)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$5(LoggingConnectionDecorator.java:261)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeBatch(LoggingConnectionDecorator.java:1273)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:263)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeBatch(JDBCStoreManager.java:1790)
      at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.executeBatch(BatchingPreparedStatementManagerImpl.java:356)
      at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:187)
      ... 29 more

      Attachments

        Issue Links

          Activity

            People

              allee8285 Albert Lee
              allee8285 Albert Lee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: