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

Solution to StaleConnection Exception problem

2 views
Skip to first unread message

Lee H

unread,
Feb 23, 2004, 3:54:06 PM2/23/04
to
I found a resaon and solution to this problem about a year ago and
have been emailed personally by several people for a solution.
Therefore, I thoght it may be a good idea to post the question and my
personal experience / answer to this problem. Hope it helps some of
you:

System is:

P3 1.2Ghz processor
OS - Win2k
WAS 4.0.5
Repository - Oracle (remote)

############################
I've been getting this error if my application has been left standing
for several hours with no activity:

04/02/03 09:18:44:344 GMT] 646a0897 StaleConnecti A CONM7007I: Mapping
the following SQLException, with ErrorCode 17,410 and SQLState <null>,
to a StaleConnectionException: java.sql.SQLException: No more data to
read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java(Inlined
Compiled Code))
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java(Inlined
Compiled Code))
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java(Compiled Code))
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java(Compiled
Code))
at oracle.jdbc.ttc7.TTC7Protocol.executeFetch(TTC7Protocol.java:729)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1759)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
at com.ibm.ejs.cm.cache.CachedStatement.executeQuery(CachedStatement.java:311)
at com.ibm.ejs.cm.proxy.StatementProxy.executeQueryCommon(StatementProxy.java:304)
at com.ibm.ejs.cm.proxy.PreparedStatementProxy.executeQuery(PreparedStatementProxy.java:53)
at com.ibm.ejs.ns.CosNaming.BindingBean.ejbFindByPrimaryKey(BindingBean.java:349)
at com.ibm.ejs.ns.CosNaming.EJSBMPBindingHomeBean.findByPrimaryKey(EJSBMPBindingHomeBean.java:28)
at com.ibm.ejs.ns.CosNaming.EJSRemoteBMPBindingHome.findByPrimaryKey(EJSRemoteBMPBindingHome.java:81)
at com.ibm.ejs.ns.CosNaming._BindingHome_Stub.findByPrimaryKey(_BindingHome_Stub.java:333)
at com.ibm.ejs.ns.CosNaming.EJBDataStore.resolve(EJBDataStore.java:339)
at com.ibm.ejs.ns.CosNaming.NsSessionBean.getBindingBean(NsSessionBean.java:101)
at com.ibm.ejs.ns.CosNaming.EJSRemoteStatelessNsSession.getBindingBean(EJSRemoteStatelessNsSession.java:53)
at com.ibm.ejs.ns.CosNaming._NsSession_Stub.getBindingBean(_NsSession_Stub.java:500)
at com.ibm.ejs.ns.CosNaming.NsSessionDataStore.resolve(NsSessionDataStore.java:137)
at com.ibm.ws.naming.rdbcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1240)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:1345)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:1657)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:796)
at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(_NamingContextImplBase.java:259)
at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.java(Compiled
Code))
at com.ibm.CORBA.iiop.ORB.process(ORB.java(Compiled Code))
at com.ibm.CORBA.iiop.OrbWorker.run(OrbWorker.java(Compiled Code))
at com.ibm.ejs.oa.pool.ThreadPool$PooledWorker.run(ThreadPool.java(Compiled
Code))
at com.ibm.ws.util.CachedThread.run(ThreadPool.java(Compiled Code))


If I stop the admin server and attempt to restart it, it fails to
restart. the only way to correct this is to reboot the machine.

Any suggestions as to what I may need to set to stop this from
happening??

Lee H

unread,
Feb 23, 2004, 3:55:54 PM2/23/04
to
Re. Previous post - StaleConnection Exception in WAS 4.0.5


I found that the problem was that the DBA team at my company was
taking cold backups of the server in the night when nobody was in the
office. i.e. they were shutting down the server to take backups of the
database. Because the database was being shutdown, WAS was losing it's
connection (WAS4 - and possibly 5) has no way of automatically
re-establishing the connection with the database. Therefore, when you
went to rerun any of the apps in WAS, a Stale Connection Exception was
thrown.

The way I got around this was:

1) spoke to the DBA's and arranged to take hot backups of the database
(backing up the database when it is still up)
2) Until this was in place, a solution was to keep the Admin Console
open. When you notice the problem happening, then goto the datasources
in the console and click the 'Test connection' button. This will
re-establish the connection to the database and the exceptions should
stop being thrown.

so after that long winded explanation of my particular problem, the
short answer is that somewhere along the line, the database and WAS
lose connectivity to each other, and cannot reconnect to each other
automatically.

Cheers

0 new messages