openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RAHEEM JIWANI (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2212) Exception caught from before_completion synchronization operation
Date Thu, 14 Jun 2012 15:53:42 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295122#comment-13295122
] 

RAHEEM JIWANI commented on OPENJPA-2212:
----------------------------------------

Thanks Albert !!

                    In the lower Environments (QA and Dev) SQL = TRACE wasn't set and so the
logs were not showing the exceptions... turned it on and was able to reproduce the issue and
fixed ! Thanks for the suggestion. It was a Duplicate Key Exception caused by duplicate data
insertion instead of update.
                
> Exception caught from before_completion synchronization operation
> -----------------------------------------------------------------
>
>                 Key: OPENJPA-2212
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2212
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.0.3
>         Environment: Stage and Prod
>            Reporter: RAHEEM JIWANI
>            Priority: Critical
>
> Looks like this issue is an OpenJPA issue. Very strange thing is the code exception catch
block doesn't catch this exception at all and this happens only in stage environment and not
in any lower environment. Though QA and Stage have exact same code base and they both get
data from same source.
> FROM the exception it looks like a duplicate primary key and its trying to insert the
same record twice, is it something with flush operation in openjpa ? multithreading ? or something
else ? 
> its definately not data issue, coz it doesn't happen in QA with same data 
> 00000287 RegisteredSyn E   WTRN0074E: Exception caught from before_completion synchronization
operation: <openjpa-1.0.3-SNAPSHOT-r420667:646455 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
ORA-00001: unique constraint (FIS.SYS_C008294) violated
> FailedObject: prepstmnt 454695706 INSERT INTO TABLENAME COLUMNS (X,Y,Z ? , ? , ?) [org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement]
> [org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement]
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3949)
> 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:97)
> 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:67)
> 	at com.ibm.ws.persistence.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:170)
> 	at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:105)
> 	at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:93)
> 	at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:75)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
> 	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955)
> 	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1853)
> 	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1771)
> 	at com.ibm.ws.uow.ComponentContextSynchronizationWrapper.beforeCompletion(ComponentContextSynchronizationWrapper.java:66)
> 	at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2404)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1637)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1608)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1543)
> 	at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:240)
> 	at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:164)
> 	at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:782)
> 	at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:206)
> 	at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
> 	at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4311)
> 	at com.ibm.ejs.container.MessageEndpointHandler.afterDelivery(MessageEndpointHandler.java:1440)
> 	at com.ibm.ejs.container.MessageEndpointHandler.invokeMessageEndpointMethod(MessageEndpointHandler.java:801)
> 	at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:762)
> 	at $Proxy54.afterDelivery(Unknown Source)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaTransactionalDispatcher.afterDelivery(SibRaTransactionalDispatcher.java:469)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:780)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:584)
> 	at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:419)
> 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
> Caused by: com.ibm.websphere.ce.cm.DuplicateKeyException: ORA-00001: unique constraint
(FIS.SYS_C008294) violated
> 	at sun.reflect.GeneratedConstructorAccessor39.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
> 	at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:523)
> 	at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:578)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.mapException(WSJdbcUtil.java:909)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:626)
> 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
> 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:856)
> 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363)
> 	at com.ibm.ws.persistence.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:112)
> 	... 29 more
> NestedThrowables:
> java.sql.SQLException: ORA-00001: unique constraint (FIS.SYS_C008294) violated
> 	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> 	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
> 	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
> 	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
> 	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
> 	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
> 	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3400)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteUpdate(WSJdbcPreparedStatement.java:948)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:615)
> 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
> 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:856)
> 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363)
> 	at com.ibm.ws.persistence.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:112)
> 	at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:105)
> 	at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:93)
> 	at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:75)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
> 	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955)
> 	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1853)
> 	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1771)
> 	at com.ibm.ws.uow.ComponentContextSynchronizationWrapper.beforeCompletion(ComponentContextSynchronizationWrapper.java:66)
> 	at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2404)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1637)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1608)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1543)
> 	at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:240)
> 	at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:164)
> 	at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:782)
> 	at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:206)
> 	at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
> 	at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4311)
> 	at com.ibm.ejs.container.MessageEndpointHandler.afterDelivery(MessageEndpointHandler.java:1440)
> 	at com.ibm.ejs.container.MessageEndpointHandler.invokeMessageEndpointMethod(MessageEndpointHandler.java:801)
> 	at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:762)
> 	at $Proxy54.afterDelivery(Unknown Source)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaTransactionalDispatcher.afterDelivery(SibRaTransactionalDispatcher.java:469)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:780)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:584)
> 	at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:419)
> 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
> ---- Begin backtrace for Nested Throwables
> java.sql.SQLException: ORA-00001: unique constraint (FIS.SYS_C008294) violated
> 	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> 	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
> 	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
> 	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
> 	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
> 	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
> 	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3400)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteUpdate(WSJdbcPreparedStatement.java:948)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:615)
> 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
> 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:856)
> 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363)
> 	at com.ibm.ws.persistence.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:112)
> 	at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:105)
> 	at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:93)
> 	at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:75)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
> 	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955)
> 	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1853)
> 	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1771)
> 	at com.ibm.ws.uow.ComponentContextSynchronizationWrapper.beforeCompletion(ComponentContextSynchronizationWrapper.java:66)
> 	at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2404)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1637)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1608)
> 	at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1543)
> 	at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:240)
> 	at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:164)
> 	at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:782)
> 	at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:206)
> 	at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
> 	at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4311)
> 	at com.ibm.ejs.container.MessageEndpointHandler.afterDelivery(MessageEndpointHandler.java:1440)
> 	at com.ibm.ejs.container.MessageEndpointHandler.invokeMessageEndpointMethod(MessageEndpointHandler.java:801)
> 	at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:762)
> 	at $Proxy54.afterDelivery(Unknown Source)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaTransactionalDispatcher.afterDelivery(SibRaTransactionalDispatcher.java:469)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:780)
> 	at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:584)
> 	at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:419)
> 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message