Distributed xact involving DB/2 on OS/390 using Websphere Application server

Dan Lamas

Distributed xact involving DB/2 on OS/390 using Websphere Application server
Hello Everyone,

Here is a brief description of what we are experiencing.

---------------------------------------------------
We are trying to incorporate distributed transactions in our java
applications. Specifically, attempting to update data residing in SYBASE
and DB2 on OS/390 within a UserTransaction in a Websphere application
server.

Following are the versions of various products in the environment:
Host database DB/2 6.1 on OS/390
DB/2 connect on Application Server version 7.2 on Windows 2000
IBM Websphere 4.0
DataSource/JDBC driver configured to use COM.ibm.db2.jdbc.DB2XADataSource
on the application server.

Currently, we are testing with a test JSP page. The Application can acquire
a XA Datasource using JNDI lookup. But when a getConnection() call is
issued to the Datasource it fails with the following exception:

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0119E Unexpected
system failure. SQLSTATE=58004
at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:174)
at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:431)
at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Connection.java:445)
at COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Connection.java:354)
at
COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>(DB2ReusableConnection.java:66)
at
COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(DB2PooledConnection.java:183)
at COM.ibm.db2.jdbc.DB2XAConnection.<init>(DB2XAConnection.java:96)
at
COM.ibm.db2.jdbc.DB2XADataSource.getXAConnection(DB2XADataSource.java:99)
at
com.ibm.ejs.cm.pool.JTAConnectionFactory.createConnection(JTAConnectionFactory.java:40)
at
com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:914)
at
com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:846)
at
com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:764)
at
com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:676)
at
com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:610)
at
com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:274)
at
com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:269)
at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:99)
at TestUserTransaction_jsp_4.
_jspService(TestUserTransaction_jsp_4.java:102)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:286)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.
_service(StrictLifecycleServlet.java:159)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

Thanks,

Dan Lamas
DBA
Duke-Energy
[login to unmask email]



Myron Miller

Re: Distributed xact involving DB/2 on OS/390 using Websphere Application server
(in response to Dan Lamas)
Did you issue the USEJDBC2 command on your DB2 Connect server? I had
the same problem until I issued this command.
--- Dan Lamas <[login to unmask email]> wrote:
> Hello Everyone,
>
> Here is a brief description of what we are experiencing.
>
> ---------------------------------------------------
> We are trying to incorporate distributed transactions in our java
> applications. Specifically, attempting to update data residing in
> SYBASE
> and DB2 on OS/390 within a UserTransaction in a Websphere application
> server.
>
> Following are the versions of various products in the environment:
> Host database DB/2 6.1 on OS/390
> DB/2 connect on Application Server version 7.2 on Windows 2000
> IBM Websphere 4.0
> DataSource/JDBC driver configured to use
> COM.ibm.db2.jdbc.DB2XADataSource
> on the application server.
>
> Currently, we are testing with a test JSP page. The Application can
> acquire
> a XA Datasource using JNDI lookup. But when a getConnection() call is
> issued to the Datasource it fails with the following exception:
>
> COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0119E Unexpected
> system failure. SQLSTATE=58004
> at
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:174)
> at
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:431)
> at
> COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Connection.java:445)
> at
> COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Connection.java:354)
> at
>
COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>(DB2ReusableConnection.java:66)
> at
>
COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(DB2PooledConnection.java:183)
> at
> COM.ibm.db2.jdbc.DB2XAConnection.<init>(DB2XAConnection.java:96)
> at
>
COM.ibm.db2.jdbc.DB2XADataSource.getXAConnection(DB2XADataSource.java:99)
> at
>
com.ibm.ejs.cm.pool.JTAConnectionFactory.createConnection(JTAConnectionFactory.java:40)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:914)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:846)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:764)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:676)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:610)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:274)
> at
>
com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:269)
> at
> com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:99)
> at TestUserTransaction_jsp_4.
> _jspService(TestUserTransaction_jsp_4.java:102)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:286)
> at
>
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415)
> at
> org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
> at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.
> _service(StrictLifecycleServlet.java:159)
> at
>
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
> at
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
> at
>
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
> at
>
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
> at
>
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
> at
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
> at
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
> at
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
> at
>
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
> at
>
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
> at
>
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
> at
>
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
> at
>
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
> at
>
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
> at
>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
> at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
>
> Thanks,
>
> Dan Lamas
> DBA
> Duke-Energy
> [login to unmask email]
>
>
>
> visit the DB2-L webpage at http://www.ryci.com/db2-l. The owners of
> the list can


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com