Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3293

Job - JobStatus entity mapping issue

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      2020-01-30 13:52:53,974 [pool-9-thread-198449] ERROR o.a.a.r.c.r.AbstractRepository - Failed to execute transaction
      org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:595)
      at org.apache.airavata.registry.core.repositories.AbstractRepository.execute(AbstractRepository.java:119)
      at org.apache.airavata.registry.core.repositories.expcatalog.ProcessRepository.saveProcess(ProcessRepository.java:83)
      at org.apache.airavata.registry.core.repositories.expcatalog.ProcessRepository.saveProcessModelData(ProcessRepository.java:51)
      at org.apache.airavata.registry.core.repositories.expcatalog.ProcessRepository.updateProcess(ProcessRepository.java:132)
      at org.apache.airavata.registry.api.service.handler.RegistryServerHandler.updateProcess(RegistryServerHandler.java:934)
      at org.apache.airavata.registry.api.RegistryService$Processor$updateProcess.getResult(RegistryService.java:16302)
      at org.apache.airavata.registry.api.RegistryService$Processor$updateProcess.getResult(RegistryService.java:16286)
      at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
      at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
      at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
      at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2374)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2211)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2103)
      at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2021)
      at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
      at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1526)
      at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:932)
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:571)
      ... 13 common frames omitted
      Caused by: org.apache.openjpa.persistence.EntityExistsException: (conn:1918422) Duplicate entry '203_5e7cba83-c232-4b20-968a-4a4bef9e1d1a-203-TASK_48c55d71-fa5f-' for key 'PRIMARY'

      {prepstmnt 871373405 INSERT INTO JOB_STATUS (JOB_ID, STATUS_ID, TASK_ID, STATE, REASON, TIME_OF_STATE_CHANGE) VALUES (?, ?, ?, ?, ?, ?) [params=(String) 203, (String) 203_5e7cba83-c232-4b20-968a-4a4bef9e1d1a, (String) TASK_48c55d71-fa5f-4b81-9f1c-14271cef0643, (String) SUBMITTED, (Reader) java.io.StringReader@657f0ad5, (Timestamp) 2017-11-22 12:47:34.0]}

      [code=1062, state=23000]
      at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4988)
      at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4963)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:133)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:75)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:144)
      at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:79)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:100)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:88)
      at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
      at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
      at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:104)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:77)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
      at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
      ... 20 common frames omitted
      Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: (conn:1918422) Duplicate entry '203_5e7cba83-c232-4b20-968a-4a4bef9e1d1a-203-TASK_48c55d71-fa5f-' for key 'PRIMARY'

      {prepstmnt 871373405 INSERT INTO JOB_STATUS (JOB_ID, STATUS_ID, TASK_ID, STATE, REASON, TIME_OF_STATE_CHANGE) VALUES (?, ?, ?, ?, ?, ?) [params=(String) 203, (String) 203_5e7cba83-c232-4b20-968a-4a4bef9e1d1a, (String) TASK_48c55d71-fa5f-4b81-9f1c-14271cef0643, (String) SUBMITTED, (Reader) java.io.StringReader@657f0ad5, (Timestamp) 2017-11-22 12:47:34.0]}

      [code=1062, state=23000]
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:218)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:194)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:58)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1133)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:275)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1791)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:268)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:119)
      ... 30 common frames omitted
      2020-01-30 13:52:53,974 [pool-9-thread-198449] ERROR o.a.a.r.a.s.h.RegistryServerHandler - PROCESS_657beee6-6875-42c5-bb3b-a383f1b1a545
      org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:595)
      at org.apache.airavata.registry.core.repositories.AbstractRepository.execute(AbstractRepository.java:119)
      at org.apache.airavata.registry.core.repositories.expcatalog.ProcessRepository.saveProcess(ProcessRepository.java:83)
      at org.apache.airavata.registry.core.repositories.expcatalog.ProcessRepository.saveProcessModelData(ProcessRepository.java:51)
      at org.apache.airavata.registry.core.repositories.expcatalog.ProcessRepository.updateProcess(ProcessRepository.java:132)
      at org.apache.airavata.registry.api.service.handler.RegistryServerHandler.updateProcess(RegistryServerHandler.java:934)
      at org.apache.airavata.registry.api.RegistryService$Processor$updateProcess.getResult(RegistryService.java:16302)
      at org.apache.airavata.registry.api.RegistryService$Processor$updateProcess.getResult(RegistryService.java:16286)
      at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
      at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
      at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
      at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2374)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2211)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2103)
      at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2021)
      at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
      at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1526)
      at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:932)
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:571)
      ... 13 common frames omitted
      Caused by: org.apache.openjpa.persistence.EntityExistsException: (conn:1918422) Duplicate entry '203_5e7cba83-c232-4b20-968a-4a4bef9e1d1a-203-TASK_48c55d71-fa5f-' for key 'PRIMARY' {prepstmnt 871373405
      INSERT INTO JOB_STATUS (JOB_ID, STATUS_ID, TASK_ID, STATE, REASON,
      TIME_OF_STATE_CHANGE)

        Attachments

          Activity

            People

            • Assignee:
              marcuschristie Marcus Christie
              Reporter:
              dimuthuupe Dimuthu Upeksha
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: