This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes java.sql.SQLException: Closed Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "java.sql.SQLException: Closed Connection" Watch "java.sql.SQLException: Closed Connection" New topic

java.sql.SQLException: Closed Connection

Shyam Hai
Ranch Hand

Joined: Feb 04, 2009
Posts: 68

I got this Exception.
how can i rectify.please...

java.sql.SQLException: Closed Connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.pool.OraclePooledConnection.getConnection(
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(
at com.dizlee.clistwat.util.ConnectionFactory.getTeleClubConnection(
Agador Paloi
Ranch Hand

Joined: Jan 24, 2006
Posts: 118
Any code to show us?
Paul Clapham

Joined: Oct 14, 2005
Posts: 19751

You went to get a connection from the connection pool, but you got an exception. So check out these things: is there code which is taking connections but not returning them to the pool? Was the database server restarted, or did the database manager kill some sessions which corresponded to connections in the pool? Do you just not have enough connections in the pool to support the number of users you have now?

As you see, all kinds of things could be wrong.
I agree. Here's the link:
subject: java.sql.SQLException: Closed Connection
It's not a secret anymore!