I have the following scenario:
A client class does all the necessary work to perform a JNDI lookup and
get a reference to my SessionBean, Manager. When calling a method, say
start(), Manager calls a class, Worker, which calls an Entity bean to
store data to the Oracle db. The Worker then sends a message to JMS. The
data is being persisted to the database and the message is being sent
properly to the JMS queue. All appears to go well on the client side as
well. Essentially, all expected behavior is affirmative but I get a long
stack dump(attached).
Please let me know if any more information is needed.
Please advise and thanks in advance.
--
Anup Vachali
Programmer
ECIDS FedExNet Development
FedEx Services
(901) 263 5829 (O)
(901) 754 6670 (R)
This is not an EJB or a JMS problem, but a JDBC transaction problem.
The JDBC connection you are using is not transaction capable. It may be that you
configured it using a regular "Data Source" as opposed to a "Tx Data Source"?
Beware what the exception suggests as you should not need to click "Emulate Two-Phase
Commit for non-XA driver". The emulation by its very nature is not perfect.
Hope this helps, I suggest posting further inquiries to the JDBC or transaction newsgroups.
Tom
Anup Vachali wrote:
> ------------------------------------------------------------------------
> Exception while commiting Tx : Name=[EJB com.fedex.net2.unit.TimerTestSBean.testNet2TimerStartup()],Xid=59:77db166484380e6c(3606758),Status=Rolled back. [Reason=javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=10,ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=rolledback,assigned=fedexnet),ServerResourceInfo[JMS_fedexnetJMS_NotDurable]=(state=rolledback,assigned=fedexnet),SCInfo[fedexnet2+fedexnet]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.fedex.net2.unit.TimerTestSBean.testNet2TimerStartup()], weblogic.jdbc=t3://199.82.241.17:7017}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=fedexnet+199.82.241.17:7017+fedexnet2+,
> Resources={})],CoordinatorURL=fedexnet+199.82.241.17:7017+fedexnet2+); nested exception is:
> weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.jts.Connection
> JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool - with nested exception:
> [javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool]
>
> Start server side stack trace:
> java.rmi.RemoteException: Exception while commiting Tx : Name=[EJB com.fedex.net2.unit.TimerTestSBean.testNet2TimerStartup()],Xid=59:77db166484380e6c(3606758),Status=Rolled back. [Reason=javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=10,ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=rolledback,assigned=fedexnet),ServerResourceInfo[JMS_fedexnetJMS_NotDurable]=(state=rolledback,assigned=fedexnet),SCInfo[fedexnet2+fedexnet]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.fedex.net2.unit.TimerTestSBean.testNet2TimerStartup()],
> weblogic.jdbc=t3://199.82.241.17:7017}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=fedexnet+199.82.241.17:7017+fedexnet2+, Resources={})],CoordinatorURL=fedexnet+199.82.241.17:7017+fedexnet2+); nested exception is:
> weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.jts.Connection
> JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool - with nested exception:
> [javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool]
> javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool
> at weblogic.jdbc.jts.Connection.prepare(Connection.java:443)
> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:1124)
> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:370)
> at weblogic.transaction.internal.ServerSCInfo.startPrepare(ServerSCInfo.java:186)
> at weblogic.transaction.internal.ServerTransactionImpl.localPrepare(ServerTransactionImpl.java:1822)
> at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:1607)
> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:218)
> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl.testNet2TimerStartup(TimerTestSBean_4vdpas_EOImpl.java:660)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl_WLSkel.invoke(Unknown Source)
> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> --------------- nested within: ------------------
> weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.jts.Connection
> JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool - with nested exception:
> [javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool]
> at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1475)
> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:263)
> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl.testNet2TimerStartup(TimerTestSBean_4vdpas_EOImpl.java:660)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl_WLSkel.invoke(Unknown Source)
> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> End server side stack trace
> ; nested exception is:
> weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.jts.Connection
> JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool
>
> Start server side stack trace:
> javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool
> at weblogic.jdbc.jts.Connection.prepare(Connection.java:443)
> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:1124)
> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:370)
> at weblogic.transaction.internal.ServerSCInfo.startPrepare(ServerSCInfo.java:186)
> at weblogic.transaction.internal.ServerTransactionImpl.localPrepare(ServerTransactionImpl.java:1822)
> at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:1607)
> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:218)
> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl.testNet2TimerStartup(TimerTestSBean_4vdpas_EOImpl.java:660)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl_WLSkel.invoke(Unknown Source)
> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> --------------- nested within: ------------------
> weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.jts.Connection
> JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool - with nested exception:
> [javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool]
> at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1475)
> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:263)
> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl.testNet2TimerStartup(TimerTestSBean_4vdpas_EOImpl.java:660)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl_WLSkel.invoke(Unknown Source)
> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> End server side stack trace
> - with nested exception:
> [javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool
>
> Start server side stack trace:
> javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = oraclePool
> at weblogic.jdbc.jts.Connection.prepare(Connection.java:443)
> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:1124)
> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:370)
> at weblogic.transaction.internal.ServerSCInfo.startPrepare(ServerSCInfo.java:186)
> at weblogic.transaction.internal.ServerTransactionImpl.localPrepare(ServerTransactionImpl.java:1822)
> at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:1607)
> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:218)
> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl.testNet2TimerStartup(TimerTestSBean_4vdpas_EOImpl.java:660)
> at com.fedex.net2.unit.TimerTestSBean_4vdpas_EOImpl_WLSkel.invoke(Unknown Source)
> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> End server side stack trace
> ]
> Error somewhere!!!