java.sql.SQLException: Closed Connection
Hi,
I am getting the following exception after upgrade to Oracle 9.2.0.8.0. It was working fine with 9.2.0.7.0 before upgrade.
Code:
The driver info:
DRIVER_NAME = oracle.jdbc.driver.OracleDriver
URL = jdbc:oracle:oci:@iut2xp
The JDBC driver jar files are as per Oracle site
1212964 Jun 9 2006 ojdbc14.jar
1427311 Jun 9 2006 ojdbc14_g.jar
37761 Jun 9 2006 ocrs12.jar
But I could not get the statement : To use the OCI driver you must also download the appropriate shared library or DLL files.
The strange thing is that the connection is working fine with one server but throwing this error with another server, although both servers use the same configuration settings for the jdbc driver.
Any help will be highly appreciated.
Code:
ERROR -[/var/iod/iodlogs/IOD.Log]-[18 Aug 2008 07:07:40,427]- Exception in execute() of LoginAction
- 146java.sql.SQLException: Closed Connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2383)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:496)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:371)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.devdaily.opensource.database.DDConnectionBroker.createDDConnection(DDConnectionBroker.java:332)
at com.devdaily.opensource.database.DDConnectionBroker.createFirstConnectionInThePool(DDConnectionBroker.java:304)
at com.devdaily.opensource.database.DDConnectionBroker.initializePoolToMinConnections(DDConnectionBroker.java:144)
at com.devdaily.opensource.database.DDConnectionBroker.<init>(DDConnectionBroker.java:121)
at com.boeing.iod.entservices.db.DatabaseHandler.<init>(DatabaseHandler.java:54)
at com.boeing.iod.entservices.db.DatabaseHandler.getDatabaseHandler(DatabaseHandler.java:42)
at com.boeing.iod.entservices.db.DatabaseFactory.getDatabaseManager(DatabaseFactory.java:30)
at com.boeing.iod.business.BusinessHandler.<init>(BusinessHandler.java:60)
at com.boeing.iod.business.PDMHandler.<init>(PDMHandler.java:72)
at com.boeing.iod.business.PDMHandler.getPDMHandler(PDMHandler.java:79)
at com.boeing.iod.business.BusinessFactory.getPDMManager(BusinessFactory.java:107)
at com.boeing.iod.web.facade.PDMSessionFacadeHandler.<init>(PDMSessionFacadeHandler.java:54)
at com.boeing.iod.web.facade.PDMSessionFacadeHandler.getPDMSessionFacadeHandler(PDMSessionFacadeHandler.java:48)
at com.boeing.iod.web.facade.SessionFactory.getPDMSessionFacade(SessionFactory.java:29)
at com.boeing.iod.web.services.nonsecure.LoginAction.execute(LoginAction.java:57)
at com.boeing.iod.web.services.IODAction.process(IODAction.java:79)
at com.boeing.iod.web.services.IODAction.execute(IODAction.java:66)
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:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.connector.CoyoteAdapter.service(Unknown Source)
at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Unknown Source)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Unknown Source)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534){code}{code}{code}{code}{code}{code}{code}{code}{code}{code}{code}{code}
Re: java.sql.SQLException: Closed Connection
Dear all,
when i clicked the export excel process from a button and run that to connect the DB in a certain interval from my Client side - occured this Closed Connection error oftenly...
can u give a solution for this error... Thanks in advance...
root cause
java.sql.SQLException: Closed Connection
oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:269)
oracle.jdbc.driver.OracleConnection.privatePrepare Statement(OracleConnection.java:962)
oracle.jdbc.driver.OracleConnection.prepareStateme nt(OracleConnection.java:869)
rfc.WorkListServlet.ExportExcel(WorkListServlet.ja va:8136)
rfc.WorkListServlet.doPost(WorkListServlet.java:41 1)
javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
Re: java.sql.SQLException: Closed Connection
1. There is no need to resurrect threads. They're free, so create your own.
2. You are closing your connection. How and where we can't say since you haven't given us any code to look at.
Re: java.sql.SQLException: Closed Connection
Quote:
Originally Posted by
Tolls
1. There is no need to resurrect threads. They're free, so create your own.
Agreed. Closing the connection to this thread.
db
THREAD CLOSED