Transaction across two base servers fails - Websphere

This is a discussion on Transaction across two base servers fails - Websphere ; I have two standalone (Base, not Network Deployed) WAS servers running on two separate machines - say server A and server B. I deploy an EJB application - say EJB A - to server A and a separate EJB application ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Transaction across two base servers fails

  1. Transaction across two base servers fails

    I have two standalone (Base, not Network Deployed) WAS servers running on two separate machines - say server A and server B. I deploy an EJB application - say EJB A - to server A and a separate EJB application - say EJB B - to server B. EJB A invokes a method on EJB B. EJB A uses bean-managed transaction. EJB B uses CMT with a transaction attribute of Supports. From an external client, I invoke a method on EJB A. As long as EJB A does NOT start a JTA transaction, e verything works fine - client invokes A which invokes B. If EJB A starts a JTA transaction before invoking EJB B, when A invokes B I get a rollback exception:

    javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No

    Any ideas? Can a JTA transaction span two unrelated Base WAS instances? Is some special configuration needed?


  2. Re: Transaction across two base servers fails

    agherardi@wideopenwest.com wrote:
    > I have two standalone (Base, not Network Deployed) WAS servers running on two separate machines - say server A and server B. I deploy an EJB application - say EJB A - to server A and a separate EJB application - say EJB B - to server B. EJB A invokes a method on EJB B. EJB A uses bean-managed transaction. EJB B uses CMT with a transaction attribute of Supports. From an external client, I invoke a method on EJB A. As long as EJB A does NOT start a JTA transaction, e verything works fine - client invokes A which invokes B. If EJB A starts a JTA transaction before invoking EJB B, when A invokes B I get a rollback exception:
    >
    > javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    >
    > Any ideas? Can a JTA transaction span two unrelated Base WAS instances? Is some special configuration needed?


    You'll need to provide more error information, e.g. any error messages
    and stacks traces from the two servers that indicate why the transaction
    rolled back. Also, what versions of WAS are you running? Do you have
    security enabled? Etc..

    One possible cause is that you're doing work with a one-phase resource
    in server B. When the transaction spans two servers it needs to use
    two-phase commit, something with which the one-phase only resource
    cannot cope.

    Regards,
    Andy

  3. Re: Transaction across two base servers fails

    Andy,
    Thanks for your feedback. I'm running WAS 6.1. Both EJB's have security turned off - no role-based authorization. Also, I've set the CSIv2 outbound and inbound transports to TCP/IP on both servers - no SSL. Both EJB's use an Oracle XA data source.

    MyBMT is the bean-managed-transaction EJB running on server A. MyCMT is the CMT EJB running on server B. MyBMT#method1 invokes MyCMT#method1. Here's the exception's stack trace.

    20 Apr 2007 10:34:25,622 | ERROR | ORB.thread.pool : 0 | mojo_server: | mojo_service: | message: Exception in method1
    javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemExcep tion(UtilDelegateImpl.java:266)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java: 84)
    at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:257)
    at ejbs.MyBMTBean.method1(MyBMTBean.java:107)
    at ejbs.EJSRemoteStatelessMyBMT_c151100a.method1(EJSR emoteStatelessMyBMT_c151100a.java:28)
    at ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie.method1 (_EJSRemoteStatelessMyBMT_c151100a_Tie.java:160)
    at ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie._invoke (_EJSRemoteStatelessMyBMT_c151100a_Tie.java:87)
    at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndler(ServerDelegate.java:613)
    at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD elegate.java:466)
    at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    at com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:2673)
    at com.ibm.rmi.iiop.Connection.doWork(Connection.java :2551)
    at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java:62)
    at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:95)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1510)
    Caused by:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    at com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive_reply(TxClientInterceptor.java:266)
    at com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive_exception(TxClientInterceptor.java:106)
    at com.ibm.rmi.pi.InterceptorManager.invokeIntercepto r(InterceptorManager.java:564)
    at com.ibm.rmi.pi.InterceptorManager.iterateClientInt erceptors(InterceptorManager.java:407)
    at com.ibm.rmi.pi.InterceptorManager.iterateReceiveEx ception(InterceptorManager.java:667)
    at com.ibm.rmi.corba.ClientDelegate.intercept(ClientD elegate.java:1010)
    at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:459)
    at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1150)
    at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:778)
    at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1180)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectIm pl.java:484)
    at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:247)
    ... 13 more

  4. Re: Transaction across two base servers fails

    I forgot - Here's SystemOut.log from server A. Nothing shows up on SystemOut.log in server B.

    [4/20/07 12:11:54:639 EDT] 00000031 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "method1" on bean "BeanId(BMTApp#BMTEJB.jar#MyBMT, null)". Exception data: java.lang.RuntimeException: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    at ejbs.MyBMTBean.method1(MyBMTBean.java:131)
    at ejbs.EJSRemoteStatelessMyBMT_c151100a.method1(EJSR emoteStatelessMyBMT_c151100a.java:28)
    at ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie.method1 (_EJSRemoteStatelessMyBMT_c151100a_Tie.java:160)
    at ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie._invoke (_EJSRemoteStatelessMyBMT_c151100a_Tie.java:87)
    at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndler(ServerDelegate.java:613)
    at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD elegate.java:466)
    at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    at com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:2673)
    at com.ibm.rmi.iiop.Connection.doWork(Connection.java :2551)
    at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java:62)
    at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:95)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1510)
    Caused by: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemExcep tion(UtilDelegateImpl.java:266)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java: 84)
    at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:257)
    at ejbs.MyBMTBean.method1(MyBMTBean.java:108)
    ... 12 more
    Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    at com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive_reply(TxClientInterceptor.java:266)
    at com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive_exception(TxClientInterceptor.java:106)
    at com.ibm.rmi.pi.InterceptorManager.invokeIntercepto r(InterceptorManager.java:564)
    at com.ibm.rmi.pi.InterceptorManager.iterateClientInt erceptors(InterceptorManager.java:407)
    at com.ibm.rmi.pi.InterceptorManager.iterateReceiveEx ception(InterceptorManager.java:667)
    at com.ibm.rmi.corba.ClientDelegate.intercept(ClientD elegate.java:1010)
    at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:459)
    at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1150)
    at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:778)
    at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1180)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectIm pl.java:484)
    at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:247)
    ... 13 more


  5. Re: Transaction across two base servers fails

    It is possible that the data you are passing in the EJB call may not be serializable.Check the object to see if the object and its contents are serializable.
    Hope this helps you to proceed ahead.

    Regards,
    Vijay

    > I forgot - Here's SystemOut.log from server A.
    > Nothing shows up on SystemOut.log in server B.
    >
    > [4/20/07 12:11:54:639 EDT] 00000031 ExceptionUtil E
    > CNTR0020E: EJB threw an unexpected (non-declared)
    > d) exception during invocation of method "method1" on
    > bean "BeanId(BMTApp#BMTEJB.jar#MyBMT, null)".
    > Exception data: java.lang.RuntimeException:
    > javax.transaction.TransactionRolledbackException:
    > CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception
    > is:
    > org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0
    > 0 minor code: 0 completed: No
    > at ejbs.MyBMTBean.method1(MyBMTBean.java:131)
    > at
    > t
    > ejbs.EJSRemoteStatelessMyBMT_c151100a.method1(EJSR emot
    > eStatelessMyBMT_c151100a.java:28)
    > at
    > t
    > ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie.method1 (_EJ
    > SRemoteStatelessMyBMT_c151100a_Tie.java:160)
    > at
    > t
    > ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie._invoke (_EJ
    > SRemoteStatelessMyBMT_c151100a_Tie.java:87)
    > at
    > t
    > com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndle
    > r(ServerDelegate.java:613)
    > at
    > t
    > com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD eleg
    > ate.java:466)
    > at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    > at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    > at
    > t
    > com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:
    > 2673)
    > at
    > t
    > com.ibm.rmi.iiop.Connection.doWork(Connection.java :255
    > 1)
    > at
    > t
    > com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java
    > :62)
    > at
    > t
    > com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:9
    > 5)
    > at
    > t
    > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:
    > 1510)
    > Caused by:
    > javax.transaction.TransactionRolledbackException:
    > CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception
    > is:
    > org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0
    > 0 minor code: 0 completed: No
    > at
    > t
    > com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemExcep tion
    > (UtilDelegateImpl.java:266)
    > at
    > t
    > javax.rmi.CORBA.Util.mapSystemException(Util.java: 84)
    > at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:257)
    > at ejbs.MyBMTBean.method1(MyBMTBean.java:108)
    > ... 12 more
    > Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK:
    > vmcid: 0x0 minor code: 0 completed: No
    > at
    > t
    > com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive
    > _reply(TxClientInterceptor.java:266)
    > at
    > t
    > com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive
    > _exception(TxClientInterceptor.java:106)
    > at
    > t
    > com.ibm.rmi.pi.InterceptorManager.invokeIntercepto r(In
    > terceptorManager.java:564)
    > at
    > t
    > com.ibm.rmi.pi.InterceptorManager.iterateClientInt erce
    > ptors(InterceptorManager.java:407)
    > at
    > t
    > com.ibm.rmi.pi.InterceptorManager.iterateReceiveEx cept
    > ion(InterceptorManager.java:667)
    > at
    > t
    > com.ibm.rmi.corba.ClientDelegate.intercept(ClientD eleg
    > ate.java:1010)
    > at
    > t
    > com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate
    > .java:459)
    > at
    > t
    > com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egat
    > e.java:1150)
    > at
    > t
    > com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate
    > .java:778)
    > at
    > t
    > com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egat
    > e.java:1180)
    > at
    > t
    > org.omg.CORBA.portable.ObjectImpl._invoke(ObjectIm pl.j
    > ava:484)
    > at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:247)
    > ... 13 more




  6. Re: Transaction across two base servers fails

    Unfortunately all that stack trace tells us is that server A has
    received a CORBA TRANSACTION_ROLLEDBACK exception in response to its
    call to server B. It doesn't tell us why the transaction in server B has
    rolled back. To figure that out we'd need to look at the SystemOut.log
    in server B...

    If there's nothing in the server B log to indicate why the transaction
    has rolled back then it suggests that the rollback is not an error case,
    i.e. the rollback has been explicitly requested by application code. If
    that's not the case then I would recommend either enabling
    Transaction=all trace in server B and looking through it to try to
    identify the cause of the rollback, or opening a PMR to have support
    help you.

    Regards,
    Andy

    agherardi@wideopenwest.com wrote:
    > I forgot - Here's SystemOut.log from server A. Nothing shows up on SystemOut.log in server B.
    >
    > [4/20/07 12:11:54:639 EDT] 00000031 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "method1" on bean "BeanId(BMTApp#BMTEJB.jar#MyBMT, null)". Exception data: java.lang.RuntimeException: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
    > org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    > at ejbs.MyBMTBean.method1(MyBMTBean.java:131)
    > at ejbs.EJSRemoteStatelessMyBMT_c151100a.method1(EJSR emoteStatelessMyBMT_c151100a.java:28)
    > at ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie.method1 (_EJSRemoteStatelessMyBMT_c151100a_Tie.java:160)
    > at ejbs._EJSRemoteStatelessMyBMT_c151100a_Tie._invoke (_EJSRemoteStatelessMyBMT_c151100a_Tie.java:87)
    > at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndler(ServerDelegate.java:613)
    > at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD elegate.java:466)
    > at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    > at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    > at com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:2673)
    > at com.ibm.rmi.iiop.Connection.doWork(Connection.java :2551)
    > at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java:62)
    > at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:95)
    > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1510)
    > Caused by: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
    > org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    > at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemExcep tion(UtilDelegateImpl.java:266)
    > at javax.rmi.CORBA.Util.mapSystemException(Util.java: 84)
    > at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:257)
    > at ejbs.MyBMTBean.method1(MyBMTBean.java:108)
    > ... 12 more
    > Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x0 minor code: 0 completed: No
    > at com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive_reply(TxClientInterceptor.java:266)
    > at com.ibm.ws.Transaction.JTS.TxClientInterceptor.rec eive_exception(TxClientInterceptor.java:106)
    > at com.ibm.rmi.pi.InterceptorManager.invokeIntercepto r(InterceptorManager.java:564)
    > at com.ibm.rmi.pi.InterceptorManager.iterateClientInt erceptors(InterceptorManager.java:407)
    > at com.ibm.rmi.pi.InterceptorManager.iterateReceiveEx ception(InterceptorManager.java:667)
    > at com.ibm.rmi.corba.ClientDelegate.intercept(ClientD elegate.java:1010)
    > at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:459)
    > at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1150)
    > at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:778)
    > at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1180)
    > at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectIm pl.java:484)
    > at ejbs._MyCMT_Stub.method1(_MyCMT_Stub.java:247)
    > ... 13 more
    >


  7. Re: Transaction across two base servers fails

    I turned on tracing on server B and found out it was a security-related problem. Apparently, even though I had turned off application security on both servers and the EJB's has no authorization constraints, global transaction on WAS requires the two servers to "trust" each other. I solved the problem by importing server A's LTPA key into server B and vice-versa.

    Thanks everybody for their suggestions.

  8. Re: Transaction across two base servers fails

    That's correct. With global security enabled the default behavior is for
    transaction protocol messages, e.g. prepare, commit, rollback to be
    secured. This prevents malicious completion of global transactions.

    If you run in an environment where security is not a concern, or the
    servers are secured by another means, this behavior can be disabled by
    unchecking the Enable protocol security check box on the transaction
    service panel in the admin console.

    Regards,
    Andy

    agherardi@wideopenwest.com wrote:
    > I turned on tracing on server B and found out it was a security-related problem. Apparently, even though I had turned off application security on both servers and the EJB's has no authorization constraints, global transaction on WAS requires the two servers to "trust" each other. I solved the problem by importing server A's LTPA key into server B and vice-versa.
    >
    > Thanks everybody for their suggestions.


+ Reply to Thread