Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stale Connection Exception:

 
Pankaj Singh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In our J2EE application, we are using Struts-Spring-Hibernate framework.

We are getting following error on SIT while running our Web based application. This error occurs while executing the code below.



The same code works fine on Development environment with identical configuration.



We feel it is something related to the DataSource configuration in WebSphere Application Server.



Quick help is much appreciated as we have strict delivery deadlines and this error is causing problems with our SIT.

-----------------------------------------------------

Details : Websphere Version : 5.2

Oracle version : 9i



Code Snippet:



import oracle.jdbc.driver.OracleConnection;

import com.ibm.ws.rsadapter.jdbc.WSJdbcUtil;

import oracle.sql.ARRAY;

import oracle.sql.ArrayDescriptor;



public ARRAY createNumberArray(final Connection conn, final Integer[] array, String strUserSchemaName)

{

String strUserId = "";

try

{

OracleConnection conn1=(OracleConnection)WSJdbcUtil.getNativeConnection((WSJdbcConnection)conn);



// the connection above is suspicious as it throws the exception when the line below is executed



final ArrayDescriptor desc = ArrayDescriptor.createDescriptor(strUserSchemaName, conn1);



final ARRAY newArray = new ARRAY(desc, conn1, array);

return newArray;

}

catch (Exception e)

{

throw new GCHBKGeneralException("Error accessing the result set",e);

}

}



Exception Trace:

[7/18/07 11:34:39:078 EDT] 2ec697db ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource jdbc/GCHBKPDataSource. The exception which was received is com.ibm.websphere.ce.cm.StaleConnectionException: Io exception: There is no process to read data written to a pipe.

[7/18/07 11:34:39:094 EDT] 2ec697db JDBCTransacti E org.hibernate.transaction.JDBCTransaction Could not toggle autocommit

[7/18/07 11:34:39:099 EDT] 2ec697db JDBCTransacti E org.hibernate.transaction.JDBCTransaction TRAS0014I: The following exception was logged com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed.

at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed(WSJdbcConnection.java:1986)

at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.setAutoCommit(WSJdbcConnection.java:2072)

at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransaction.java:174)

at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:122)

at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:95)

at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)

at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:496)

at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)

at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:302)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)

at $Proxy8.bookAllTrans(Unknown Source)

at com.jpmorgan.wss.gchbk.action.BookUnbookTransAction.bookAllTrans(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))

at java.lang.reflect.Method.invoke(Method.java(Compiled Code))

at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)

at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)

at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:208)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:321)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic