Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

At attempted update under optimistic concurrency control failed  RSS feed

 
Mahesh Malviya
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am calling a entity bean from a session bean. After making updation in a entitybean when method of the session bean complets it shows the following message. Can any body tell me why this error has come.

[10/12/04 12:59:15:672 IST] 40c5f489 DataAccessReq E PMGR6025E: At attempted update under optimistic concurrency control failed because the bean data has changed in the datastore since this transaction read it. Either a predicate field has changed value or the bean itself has been removed.
[10/12/04 12:59:15:688 IST] 40c5f489 DataAccessReq E PMGR0000E: Call stack:
com.ibm.ws.ejbpersistence.utilpm.OptimisticUpdateFailedException: PMGR6025E: An attempted update under optimistic concurrency control failed because another application has changed the bean data in the datastore since this transaction read it. Either it changed a predicate field value or removed the bean itself.
at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.executeStore(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.CBOldDirtyState.ejbStore(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.ejbStore(Unknown Source)
at com.uboc.wpm.cmp.ConcreteLoanPopulateB_d69d7056.ejbStore(ConcreteLoanPopulateB_d69d7056.java:56)
at com.ibm.ejs.container.ContainerManaged2_0BeanO.store(ContainerManaged2_0BeanO.java:232)
at com.ibm.ejs.container.EntityBeanO.beforeCompletion(EntityBeanO.java:1051)
at com.ibm.ejs.container.ContainerTx.beforeCompletion(ContainerTx.java:550)
at com.ibm.ejs.util.tran.SyncDriver.beforeCompletion(SyncDriver.java:226)
at com.ibm.ejs.jts.jta.TransactionImpl$SyncronizationWrapper.before_completion(TransactionImpl.java:1270)
at com.ibm.ejs.jts.jts.CoordinatorImpl$Sync.beforePrepare(CoordinatorImpl.java:1188)
at com.ibm.ejs.jts.tran.EventCallback.executeCallback(EventCallback.java:166)
at com.ibm.ejs.jts.tran.EventCallback.executeCallbackTree(EventCallback.java:132)
at com.ibm.ejs.jts.tran.EventPrepare.ExecuteBeforePrepareCallbacks(EventPrepare.java:307)
at com.ibm.ejs.jts.tran.EventPrepare.event_LocalPrepareWork(EventPrepare.java:287)
at com.ibm.ejs.jts.tran.EventPrepare.event_BecomeCoordinator(EventPrepare.java:970)
at com.ibm.ejs.jts.tran.EventControl.event_EndTopLevel(EventControl.java:295)
at com.ibm.ejs.jts.tran.TrecInterface.end(TrecInterface.java:89)
at com.ibm.ejs.jts.jts.TerminatorImpl.commit(TerminatorImpl.java:104)
at com.ibm.ejs.jts.jts.CurrentImpl.commit(CurrentImpl.java:249)
at com.ibm.ejs.jts.jts.CurrentSet.commit(CurrentSet.java:316)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:623)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:148)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:535)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2911)
at com.uboc.wpm.ssn.EJSLocalStatelessRecycleLoan_2d936946.splitRecords(EJSLocalStatelessRecycleLoan_2d936946.java:34)
at com.uboc.wpm.servlets.CallRecycleLoan.callRecycleLoanProcedure(CallRecycleLoan.java:74)
at com.uboc.wpm.servlets.CallRecycleLoan.doGet(CallRecycleLoan.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

[10/12/04 12:59:17:500 IST] 40c5f489 ExceptionUtil E CNTR0021E: Non-application exception occurred on bean "BeanId(WPM#WPM-EJB-MODULES.jar#LoanPopulateB, com.uboc.wpm.cmp.LoanPopulateBKey@eea3f4d4)": Exception data: java.rmi.NoSuchObjectException: com.ibm.ws.ejbpersistence.utilpm.OptimisticUpdateFailedException: PMGR6025E: An attempted update under optimistic concurrency control failed because another application has changed the bean data in the datastore since this transaction read it. Either it changed a predicate field value or removed the bean itself.
at com.ibm.ejs.container.ContainerManaged2_0BeanO.store(ContainerManaged2_0BeanO.java:246)
at com.ibm.ejs.container.EntityBeanO.beforeCompletion(EntityBeanO.java:1051)
at com.ibm.ejs.container.ContainerTx.beforeCompletion(ContainerTx.java:550)
at com.ibm.ejs.util.tran.SyncDriver.beforeCompletion(SyncDriver.java:226)
at com.ibm.ejs.jts.jta.TransactionImpl$SyncronizationWrapper.before_completion(TransactionImpl.java:1270)
at com.ibm.ejs.jts.jts.CoordinatorImpl$Sync.beforePrepare(CoordinatorImpl.java:1188)
at com.ibm.ejs.jts.tran.EventCallback.executeCallback(EventCallback.java:166)
at com.ibm.ejs.jts.tran.EventCallback.executeCallbackTree(EventCallback.java:132)
at com.ibm.ejs.jts.tran.EventPrepare.ExecuteBeforePrepareCallbacks(EventPrepare.java:307)
at com.ibm.ejs.jts.tran.EventPrepare.event_LocalPrepareWork(EventPrepare.java:287)
at com.ibm.ejs.jts.tran.EventPrepare.event_BecomeCoordinator(EventPrepare.java:970)
at com.ibm.ejs.jts.tran.EventControl.event_EndTopLevel(EventControl.java:295)
at com.ibm.ejs.jts.tran.TrecInterface.end(TrecInterface.java:89)
at com.ibm.ejs.jts.jts.TerminatorImpl.commit(TerminatorImpl.java:104)
at com.ibm.ejs.jts.jts.CurrentImpl.commit(CurrentImpl.java:249)
at com.ibm.ejs.jts.jts.CurrentSet.commit(CurrentSet.java:316)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:623)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:148)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:535)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2911)
at com.uboc.wpm.ssn.EJSLocalStatelessRecycleLoan_2d936946.splitRecords(EJSLocalStatelessRecycleLoan_2d936946.java:34)
at com.uboc.wpm.servlets.CallRecycleLoan.callRecycleLoanProcedure(CallRecycleLoan.java:74)
at com.uboc.wpm.servlets.CallRecycleLoan.doGet(CallRecycleLoan.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
.
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does this happen when you run a single thread / client / when running multiple clients?

can you check the update query that websphere runs?

could be soemthing like this,

update <tableA> set w ='a', x = 'b where y = 'c' and z= 'd'

are the values for c and d different from what you see in the database for the same row? If they are different then the error being reported is what it means...meaning some other thread has indeed updated the row before this thread got a chance to update

Are y and z of the type java.util.date? May be the java date and database date column types are'nt compatible and hence the update fails and resuts in an optimistic concurrency exception.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!