openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From is_maximum <mnr...@gmail.com>
Subject concurrent transactions...
Date Tue, 16 Dec 2008 12:04:29 GMT

Hello


I have a business method in which a list will be processed and a number of
records will be persisted for each element in the list, now for performance
issues we need to split the list into a a few sublist and then create a
thread for each. 


in normal proccessing the method works fine but in threaded methods I
encounter an exception as follows.


the thing is it complains that one of the entities has an unknown state
manager but in stack trace you can find and Oracle error which means that
the JPA has sent the query to the database, however the insert query is
uncoleted and not correct!!!



WARN - Unexpected exception from beforeCompletion; transaction will roll
back
 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:2163)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010)
      at
org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
      at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:472)
      at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:258)
      at
org.apache.openejb.core.transaction.TransactionPolicy.rollbackTransaction(TransactionPolicy.java:183)
      at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:78)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
      at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
      at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
      at $Proxy76.saveOrUpdate(Unknown Source)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.timeManagedTradeOffProcess(EndOfDayServiceImpl.java:500)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.access$0(EndOfDayServiceImpl.java:431)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl$1.call(EndOfDayServiceImpl.java:915)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      at com.kishware.common.thread.GeneralThread.run(GeneralThread.java:38)
Caused by:  org.apache.openjpa.persistence.PersistenceException: The
instance " CurrencyCoin: id=3, type=CURRENCY" has an unknown state manager
which prevents field inspection.
      at
org.apache.openjpa.kernel.DetachedValueStateManager.fetch(DetachedValueStateManager.java:285)
      at
org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.getJoinValue(HandlerFieldStrategy.java:351)
      at
org.apache.openjpa.jdbc.sql.RowImpl.flushJoinValues(RowImpl.java:280)
      at
org.apache.openjpa.jdbc.sql.RowImpl.flushForeignKey(RowImpl.java:221)
      at org.apache.openjpa.jdbc.sql.RowImpl.setForeignKey(RowImpl.java:196)
      at
org.apache.openjpa.jdbc.sql.PrimaryRow.setForeignKey(PrimaryRow.java:172)
      at
org.apache.openjpa.jdbc.meta.ValueMappingImpl.setForeignKey(ValueMappingImpl.java:317)
      at
org.apache.openjpa.jdbc.meta.FieldMapping.setForeignKey(FieldMapping.java:995)
      at
org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.insert(RelationFieldStrategy.java:217)
      at
org.apache.openjpa.jdbc.meta.FieldMapping.insert(FieldMapping.java:579)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.insert(AbstractUpdateManager.java:197)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.populateRowManager(AbstractUpdateManager.java:139)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:85)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:655)
      at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      ... 26 more
NestedThrowables:
 org.apache.openjpa.persistence.PersistenceException: ORA-01400: cannot
insert NULL into ("PROC1"."GL1EODPRCS"."G1033ID")
 {prepstmnt 18888821 INSERT INTO GL1EODPRCS (G1033BCKDT) VALUES (?)
[params=(int) 0]} [code=1400, state=23000]
FailedObject: com.kishware.core.gl.data.EODTradeOffProcess@726693
      at
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4238)
      at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4203)
      at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
      at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:131)
      at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:82)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:89)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:72)
      at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:543)
      at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:105)
      at
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:655)
      at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010)
      at
org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
      at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:472)
      at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:258)
      at
org.apache.openejb.core.transaction.TransactionPolicy.rollbackTransaction(TransactionPolicy.java:183)
      at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:78)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
      at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
      at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
      at $Proxy76.saveOrUpdate(Unknown Source)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.timeManagedTradeOffProcess(EndOfDayServiceImpl.java:500)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.access$0(EndOfDayServiceImpl.java:431)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl$1.call(EndOfDayServiceImpl.java:915)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      at com.kishware.common.thread.GeneralThread.run(GeneralThread.java:38)
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-01400:
cannot insert NULL into ("PROC1"."GL1EODPRCS"."G1033ID")
 {prepstmnt 18888821 INSERT INTO GL1EODPRCS (G1033BCKDT) VALUES (?)
[params=(int) 0]} [code=1400, state=23000]
      at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
      at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
      at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:866)
      at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
      at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1504)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:151)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:120)
      ... 36 more
NestedThrowables:
java.sql.SQLException: ORA-01400: cannot insert NULL into
("PROC1"."GL1EODPRCS"."G1033ID")

      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
      at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
      at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
      at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
      at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
      at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
      at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
      at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:864)
      at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
      at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1504)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:151)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:120)
      at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:82)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:89)
      at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:72)
      at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:543)
      at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:105)
      at
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
      at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:655)
      at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010)
      at
org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
      at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
      at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:472)
      at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:258)
      at
org.apache.openejb.core.transaction.TransactionPolicy.rollbackTransaction(TransactionPolicy.java:183)
      at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:78)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
      at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
      at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
      at $Proxy76.saveOrUpdate(Unknown Source)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.timeManagedTradeOffProcess(EndOfDayServiceImpl.java:500)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.access$0(EndOfDayServiceImpl.java:431)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl$1.call(EndOfDayServiceImpl.java:915)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      at com.kishware.common.thread.GeneralThread.run(GeneralThread.java:38)
java.util.concurrent.ExecutionException: javax.ejb.EJBException: The bean
encountered a non-application exception.; nested exception is: 
       org.apache.openjpa.persistence.InvalidStateException: Encountered
unmanaged object in persistent field
"com.kishware.core.gl.data.EODTradeOffProcess.currency" during flush. 
However, this field does not allow cascade persist. Set the cascade
attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA
annotations) or "persist" or "all" (JPA orm.xml), or enable cascade-persist
globally, or manually persist the related field value prior to flushing. You
cannot flush unmanaged objects or graphs that have persistent associations
to unmanaged objects.
FailedObject:
org.apache.openjpa.enhance.com$kishware$core$gl$data$CurrencyCoin$pcsubclass-com.kishware.core.gl.data.CurrencyCoin-3
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
      at java.util.concurrent.FutureTask.get(FutureTask.java:80)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.concurrentDailyInterBranchTradeOffs(EndOfDayServiceImpl.java:926)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:158)
      at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:141)
      at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
      at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
      at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
      at $Proxy75.concurrentDailyInterBranchTradeOffs(Unknown Source)
      at
com.kishware.core.gl.service.eod.EndOfDayTest2.testInterBranchVoucher(EndOfDayTest2.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      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 junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
      at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
      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: javax.ejb.EJBException: The bean encountered a non-application
exception.; nested exception is: 
       org.apache.openjpa.persistence.InvalidStateException: Encountered
unmanaged object in persistent field
"com.kishware.core.gl.data.EODTradeOffProcess.currency" during flush. 
However, this field does not allow cascade persist. Set the cascade
attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA
annotations) or "persist" or "all" (JPA orm.xml), or enable cascade-persist
globally, or manually persist the related field value prior to flushing. You
cannot flush unmanaged objects or graphs that have persistent associations
to unmanaged objects.
FailedObject:
org.apache.openjpa.enhance.com$kishware$core$gl$data$CurrencyCoin$pcsubclass-com.kishware.core.gl.data.CurrencyCoin-3
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:366)
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:323)
      at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
      at $Proxy76.saveOrUpdate(Unknown Source)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.timeManagedTradeOffProcess(EndOfDayServiceImpl.java:500)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl.access$0(EndOfDayServiceImpl.java:431)
      at
com.kishware.core.gl.service.eod.EndOfDayServiceImpl$1.call(EndOfDayServiceImpl.java:915)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      at com.kishware.common.thread.GeneralThread.run(GeneralThread.java:38)
Caused by:  org.apache.openjpa.persistence.InvalidStateException:
Encountered unmanaged object in persistent field
"com.kishware.core.gl.data.EODTradeOffProcess.currency" during flush. 
However, this field does not allow cascade persist. Set the cascade
attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA
annotations) or "persist" or "all" (JPA orm.xml), or enable cascade-persist
globally, or manually persist the related field value prior to flushing. You
cannot flush unmanaged objects or graphs that have persistent associations
to unmanaged objects.
FailedObject:
org.apache.openjpa.enhance.com$kishware$core$gl$data$CurrencyCoin$pcsubclass-com.kishware.core.gl.data.CurrencyCoin-3
      at
org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:753)
      at
org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:594)
      at
org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)
      at
org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)
      at
org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2828)
      at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
      at
org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:959)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1948)
      at
org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1679)
      at
org.apache.openjpa.kernel.DelegatingBroker.flush(DelegatingBroker.java:989)
      at
org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:592)
      at
org.apache.openejb.persistence.JtaEntityManager.flush(JtaEntityManager.java:130)
      at
com.kishware.core.gl.dao.jpa.EndOfDayServiceDaoImpl.saveOrUpdate(EndOfDayServiceDaoImpl.java:108)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:158)
      at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:141)
      at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
      at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
      at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
      at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
      at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
      ... 11 more



can anyone help me out of this problem?


thanks 

-- 
View this message in context: http://n2.nabble.com/concurrent-transactions...-tp1662428p1662428.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message