Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
6420 Posts
ACCEPTED ANSWER

Pinned topic Issues mirating from WAS6.1 to WAS 8

‏2012-03-15T15:15:13Z |
Hi

I've setup and deployed my web app to a WAS 8 on RSA 8 and am going through verification testing. I'm having an issue on some CMP beans failing on an OptimisticUpdateFailedException when trying to update the database or create a new record. This is production code running fine on WAS 6.1.

To manage multiple update issues, we retrieve a datetime field to check that the record hasen't been modified by another user, that test is passing. This seems to be an exception thrown from the container. I have noticed that this bean doesn't have an access intent specfied so it is using the default wsPessimisticUpdate- Weakest LockAtLoad. I did change the access intent, but it didn't help.

We are using a SQL 2008 database, but the older SQL 2005 connection jars.

Log file from local server with only one user as follows;

CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
javax.ejb.EJBException: Contact for the key 8180 not updated because it was previously updated or deleted by another user. OptimisticUpdateFailedException vmcid: 0x0 minor code: 0 completed: No
javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
javax.ejb.EJBException: Contact for the key 8180 not updated because it was previously updated or deleted by another user. OptimisticUpdateFailedException vmcid: 0x0 minor code: 0 completed: No
at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:287)
at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:751)
at javax.rmi.CORBA.Util.wrapException(Util.java:296)
at ca.mb.wcb.optimal.account.services._ContactService_Stub.setDefaultContact(_ContactService_Stub.java:474)
at ca.mb.wcb.optimal.account.services.ContactServiceDelegate.setDefaultContact(ContactServiceDelegate.java:149)
at ca.mb.wcb.optimal.account.mvc.AccountContactList.doSetDefault(AccountContactList.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
...
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1147)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:722)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:449)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:886)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1655)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650)
Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
javax.ejb.EJBException: Contact for the key 8180 not updated because it was previously updated or deleted by another user. OptimisticUpdateFailedException vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.rmi.util.ProxyUtil.copyObject(ProxyUtil.java:255)
at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObject(UtilDelegateImpl.java:856)
at javax.rmi.CORBA.Util.copyObject(Util.java:333)
at ca.mb.wcb.optimal.account.services._ContactService_Stub.setDefaultContact(_ContactService_Stub.java:470)
... 34 more
Caused by: javax.transaction.TransactionRolledbackException: ; nested exception is:
javax.ejb.EJBException: Contact for the key 8180 not updated because it was previously updated or deleted by another user. OptimisticUpdateFailedException
at ca.mb.wcb.optimal.account.entities.ContactEntityBean.ejbStore(ContactEntityBean.java:887)
at com.ibm.ejs.container.BeanManagedBeanO.store(BeanManagedBeanO.java:238)
at com.ibm.ejs.container.EntityBeanO.beforeCompletion(EntityBeanO.java:1229)
at com.ibm.ejs.container.ContainerTx.beforeCompletion(ContainerTx.java:708)
at com.ibm.ejs.util.tran.SyncDriver.beforeCompletion(SyncDriver.java:281)
at com.ibm.tx.jta.impl.RegisteredSyncs.coreDistributeBefore(RegisteredSyncs.java:291)
at com.ibm.ws.tx.jta.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:152)
at com.ibm.ws.tx.jta.TransactionImpl.prePrepare(TransactionImpl.java:2338)
at com.ibm.ws.tx.jta.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:557)
at com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:1015)
at com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:949)
at com.ibm.ws.tx.jta.TranManagerImpl.commit(TranManagerImpl.java:438)
at com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:181)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:922)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:234)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:579)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4843)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4651)
at ca.mb.wcb.optimal.account.services.EJSRemoteStatelessContactService_2171e22c.setDefaultContact(EJSRemoteStatelessContactService_2171e22c.java:196)
at ca.mb.wcb.optimal.account.services._ContactService_Stub.setDefaultContact(_ContactService_Stub.java:467)
... 34 more
Caused by: javax.ejb.EJBException: Contact for the key 8180 not updated because it was previously updated or deleted by another user. OptimisticUpdateFailedException
... 54 more