jQuery in Action, 2nd edition*
The moose likes Websphere and the fly likes stale connection exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "stale connection exception" Watch "stale connection exception" New topic

stale connection exception

Vanessa Spanik

Joined: Jul 15, 2002
Posts: 4
I am running applications on Websphere Application Server version 4.0, which connect to an Oracle 8.1.7 Database. These applicatons use connection pooling.
I am getting the following exception on a somewhat regular basis. The application won't work one minute and the next second it does:
2ad7271 StaleConnecti A CONM7007I: Mapping the following SQLException, with ErrorCode 17,002 and SQLState <null>, to a StaleConnectionException: java.sql.SQLException: Io exception: End of TNS data channel
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1767)
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:280)
at com.ibm.ejs.cm.proxy.StatementProxy.executeQueryCommon(StatementProxy.java:253)
at com.ibm.ejs.cm.proxy.PreparedStatementProxy.executeQuery(PreparedStatementProxy.java:44)
at com.database.CustomSQLStatement.getRow(CustomSQLStatement.java:662)
What causes this error and how do you fix it?
Arvind Shukla
Ranch Hand

Joined: Jun 26, 2002
Posts: 38
Just make sure that there is no firewall between WAS and oracle. If there is any, find out what is the time-out set for connections in firewall. In case firewall invalidates the connection but application still tries to get the data, this could be the reason for your trouble.

Arvind,<br />IBM Certified WAS admin (Test 489, Test 340, Test341)
Vinod Bijlani
Ranch Hand

Joined: Mar 06, 2002
Posts: 133
have you been everable to connect to oracle on this server?
maybe u r trying to use a connection object which has already been closed........
rock cordial

Joined: Jul 22, 2002
Posts: 6
I got same problem like you,but use db2.
when i use jdbc,everything is ok,but when i use was4.02 it didn't work.And there is no firework exist.
Vanessa Spanik

Joined: Jul 15, 2002
Posts: 4
I have been able to connect to Oracle on the other machine. For example, someone will try to access one of our applications, get an error message, then hits refresh and the application works. I will look into the firewall suggestion and see what its settings are, but may take a while since a completely different group manages that.
Don't get me started about those stupid light bulbs.
subject: stale connection exception
Similar Threads
Oracle Blob using Java help (Error: JVM_recv in socket input stream read )
invalid host/bind variable name
Retreving PDF File from Database using Java
DB Error
Storing blob > 4kb in oracle db through jdbc