Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Oracle XA DataSource in WebSphere 5

68 views
Skip to first unread message

dual0

unread,
Sep 5, 2003, 4:20:03 AM9/5/03
to
Hello, we have some problem deploy Oracle XA Driver on WebSphere 5
Test Enviroment inside WSAD 5.

----------------------------------------------------------------------
1) I want to use Oracle XA driver (9.2.0.x) as DataSource in the Test
Enviroment. The driver is listed in the JDBC driver list but it seems
to
don't work.
The question is:

Is the Oracle XA Driver supported in the WebSphere 5 Test Enviroment?
If not, it is supported in another version of WebSphere 5?

Be aware that I tryed with Thin and OCI driver, but the error was
always
the same.
I had a deep search on groups but anyboby seems to have the right
answer!

----------------------------------------------------------------------
2) can I use XA Oracle DataSource direcly in a Session Bean that is in
a
Container Managed Transaction (local/global transaction)?
(I used stateless and statefull session, but the result was always the
same)
----------------------------------------------------------------------
3) can I use XA Oracle DataSource direcly in a Session Bean that is in
a
Bean Managed Transaction (local/global transaction)?
(I used stateless and statefull session, but the result was always the
same)
----------------------------------------------------------------------

4) the error I get:

Method enlist caught javax.transaction.SystemException: Failed to
start
the transaction association.
at
com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:757)
at com.ibm.ejs.jts.jta.JTSXA.enlist(JTSXA.java:998)
at
com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:598)
at
com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:696)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1132)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.beginTransactionIfNecessary(WSJdbcConnection.java:429)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCallCommon(WSJdbcConnection.java:1304)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCall(WSJdbcConnection.java:1263)
at
com.ibservices.oraclewrapper.service.IbOracleWrapperServiceBean.executeSimpleTest(IbOracleWrapperServiceBean.java:401)
at
com.ibservices.oraclewrapper.service.EJSLocalStatefulIbOracleWrapperService_60a5f154.executeSimpleTest(EJSLocalStatefulIbOracleWrapperService_60a5f154.java:321)
at
com.ibservices.oraclewrapper.service.IbOracleWrapperService.executeSimpleTest(IbOracleWrapperService.java:103)
at
com.ibservices.dummytest.manager.IbDummyTestManagerBean.testUserOracleWrapper(IbDummyTestManagerBean.java:53)
at
com.ibservices.dummytest.manager.IbDummyTestManagerBean.dummy(IbDummyTestManagerBean.java:45)
at
com.ibservices.dummytest.manager.EJSRemoteStatefulDummyTestManager_aaea49f5.dummy(EJSRemoteStatefulDummyTestManager_aaea49f5.java:28)
at
com.ibservices.dummytest.manager._EJSRemoteStatefulDummyTestManager_aaea49f5_Tie.dummy(_EJSRemoteStatefulDummyTestManager_aaea49f5_Tie.java:156)
at
com.ibservices.dummytest.manager._EJSRemoteStatefulDummyTestManager_aaea49f5_Tie._invoke(_EJSRemoteStatefulDummyTestManager_aaea49f5_Tie.java:79)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
while trying to enlist resources from datasource XADefaultDS with the
Transaction Manager for the current transaction, and threw a
ResourceException.
[9/5/03 9:37:04:860 CEST] 2a2c22b1 SystemErr R ERROR
[com.ibservices.oraclewrapper.service.IbOracleWrapperServiceBean] SQL
exception -->
[9/5/03 9:37:04:861 CEST] 2a2c22b1 SystemErr R
java.sql.SQLException: DSRA9002E: ResourceException with error code
null: javax.resource.ResourceException: enlist: caught Exception
at
com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:699)
at
com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:696)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1132)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.beginTransactionIfNecessary(WSJdbcConnection.java:429)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCallCommon(WSJdbcConnection.java:1304)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCall(WSJdbcConnection.java:1263)
at
com.ibservices.oraclewrapper.service.IbOracleWrapperServiceBean.executeSimpleTest(IbOracleWrapperServiceBean.java:401)
at
com.ibservices.oraclewrapper.service.EJSLocalStatefulIbOracleWrapperService_60a5f154.executeSimpleTest(EJSLocalStatefulIbOracleWrapperService_60a5f154.java:321)
at
com.ibservices.oraclewrapper.service.IbOracleWrapperService.executeSimpleTest(IbOracleWrapperService.java:103)
at
com.ibservices.dummytest.manager.IbDummyTestManagerBean.testUserOracleWrapper(IbDummyTestManagerBean.java:53)
at
com.ibservices.dummytest.manager.IbDummyTestManagerBean.dummy(IbDummyTestManagerBean.java:45)
at
com.ibservices.dummytest.manager.EJSRemoteStatefulDummyTestManager_aaea49f5.dummy(EJSRemoteStatefulDummyTestManager_aaea49f5.java:28)
at
com.ibservices.dummytest.manager._EJSRemoteStatefulDummyTestManager_aaea49f5_Tie.dummy(_EJSRemoteStatefulDummyTestManager_aaea49f5_Tie.java:156)
at
com.ibservices.dummytest.manager._EJSRemoteStatefulDummyTestManager_aaea49f5_Tie._invoke(_EJSRemoteStatefulDummyTestManager_aaea49f5_Tie.java:79)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)

shlomo

unread,
Sep 5, 2003, 9:44:57 AM9/5/03
to
Hi,
I have the same situation (CMP and session bean doing JDBC call) but
with other errors. The new JDBC drivers from oracle solve several
bugs. Try them here:
http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html

And replace the one you download with th existing one. I am not using
Test environment so I dont know the exact location of the classes
under WSAD (it is named classes12.zip or classes12.jar)

Shlomo.

du...@bluewin.ch (dual0) wrote in message news:<47d4251d.03090...@posting.google.com>...

dual0

unread,
Sep 8, 2003, 9:38:46 AM9/8/03
to
Hello, I tryed something but...

Fisrt at all oracle.jdbc.xa.OracleXADataSource give me an error:
InstantiateException !!! It seems WebSphere cannot instantiate it. I
tryed to instantiate it by hand but the compiler give me an error.

So I continue with the client version of my
oracle.jdbc.xa.OracleXADataSource
(oracle.jdbc.xa.client.OracleXADataSource).

I have a session bean and I tryed many times with different settings to
excecute the following code:

//UserTransaction ut = mySessionCtx.getUserTransaction();
try{
//ut.begin();
Context jndiContext = new InitialContext();
DataSource ds = (DataSource)jndiContext.lookup("XADefaultDS");
Connection con = getConnection();
String sql = "select * from cat;";
CallableStatement stmt = con.prepareCall(sql);
stmt.executeQuery();
conn.close();
//ut.commit();
} catch ...

Note: that the ut object is used only for bean managed persistence.

1) statefull, container managed, transaction mandatory,
2) stateless, container managed, transaction mandatory,
3) stateless, bean managed, I use UserTransaction with begin and start,
4) statefull bean managed, I use UserTransaction with begin and start,
and I got the same error:

XAER_RMERR

Method enlist caught javax.transaction.SystemException: Failed to
> start
> the transaction association.
> at
> com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:757)
> at com.ibm.ejs.jts.jta.JTSXA.enlist(JTSXA.java:998)
> at
> com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:598)
> at
> com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:696)
> at
> com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1132)
> at
> com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.beginTransactionIfNecessary(WSJdbcConnection.java:429)
> at


mah... :(

shl...@idit.co.il (shlomo) wrote in message news:<3d911fac.03090...@posting.google.com>...

Dan

unread,
Sep 9, 2003, 2:09:51 PM9/9/03
to

Hi,

first of all you should check with your DBA that the JVM is installed
into your Oracle instance. There is a script to do that
(javavm/install/initjvm.sql) and if you don't install these packages,
the XA driver will not work.
If you have an account on http://metalink.oracle.com you can read note
156477.1 "JVM Installation on 8.1.7".

Hope it helps,

Dan

Jack

unread,
Sep 18, 2003, 3:44:59 PM9/18/03
to
Did you figure out the problem. I am having a similar problem.
My environment:
WebSphere 5.0.2
Oracle 8.1.7

The application was original developed on Weblogic and it works fine
there. I am porting the app to WebSphere and I encountered the
following error when the code calling prepareStatement. There is the
stateless session EJB doing container managed transaction. It uses two
resources, JDBC and JMS. I used Oracle JDBC Driver(XA) and JMS with XA
enabled.

9/18/03 14:58:01:042 EDT] 5deeec25 WSRdbDataSour u Database version is
Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.0.0 - 64bit Production

[9/18/03 14:58:01:042 EDT] 5deeec25 WSRdbDataSour u JDBC Driver
version is
8.1.7.0.0

[9/18/03 14:58:01:473 EDT] 5deeec25 TraceNLS u No message text
associated with key
The.XA.Error.is............:.-3
The.XA.Error.message.is....:.A.resource.manager.error.has.occured.in.the.transaction.branch.
The.Oracle.Error.code.is...:.65535
The.Oracle.Error.message.is:.Internal.XA.Error
in bundle IBMDataStoreAdapterNLS

[9/18/03 14:58:01:443 EDT] 5deeec25 WSRdbXaResour I
The XA Error is : -3
The XA Error message is : A resource manager error has occured in the
transaction branch.
The Oracle Error code is : 65535
The Oracle Error message is: Internal XA Error


[9/18/03 14:58:01:623 EDT] 5deeec25 WSRdbXaResour W DSRA0302E:
XAException occurred. Error code is: XAER_RMERR. Exception is: <null>

[9/18/03 14:58:03:846 EDT] 5deeec25 XATransaction E J2CA0030E: Method


enlist caught javax.transaction.SystemException: Failed to start the
transaction association.

at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:782)
at com.ibm.ejs.jts.jta.JTSXA.enlist(JTSXA.java:998)
at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:740)
at com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:743)
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1299)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.beginTransactionIfNecessary(WSJdbcConnection.java:328)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1385)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1353)

shlomo

unread,
Sep 21, 2003, 9:35:41 AM9/21/03
to
Here is the solution:
read the thread named "tx datasource issue again" , see the response by Jaceques.
"To fix that, during install, when declaring CMP's datasource, specify the
JNDI name of the CMP datasource (ususally eis/jdbc/datasource if the JNDI
name of the datasource is jdbc/datasource, the datasource should have been
declared to be used with CMPs) but specify an authorisation by container
instead of connection factory."


:)
kxz...@hotmail.com (Jack) wrote in message news:<ac8132dc.0309...@posting.google.com>...

CalB

unread,
Sep 25, 2003, 9:57:20 AM9/25/03
to
Hi,
I am getting the same error message trying to use the 9.x XA drivers.
I went back to the 8.x drivers to try it and found a different error
message "PLS-00201: identifier 'JAVA_XA.XA_START_NEW' must be
declared". But I believe they are caused by the same thing. You need
to have the stored procs for the Oracle XA support loaded into Oracle.
Please see the last message on this SUN posting for details:
http://forum.java.sun.com/thread.jsp?thread=290705&forum=35&message=1143678

du...@bluewin.ch (dual0) wrote in message news:<47d4251d.03090...@posting.google.com>...

0 new messages