Results 1 to 5 of 5
  1. #1
    sunjavaboy is offline Member
    Join Date
    Mar 2008
    Posts
    12
    Rep Power
    0

    Question 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.

    Java 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.

    Java 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}

  2. #2
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    6

    Default

    Have you opened the connection without errors? Can you execute any actions with the connection or does the first one fail?

  3. #3
    Thilahar is offline Member
    Join Date
    May 2011
    Posts
    4
    Rep Power
    0

    Unhappy 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)

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default 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.
    Please do not ask for code as refusal often offends.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: java.sql.SQLException: Closed Connection

    Quote Originally Posted by Tolls View Post
    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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 6
    Last Post: 09-01-2010, 11:29 AM
  2. Replies: 2
    Last Post: 06-07-2010, 08:45 AM
  3. java.sql.SQLException: ORA-01722: invalid number
    By balushanmukha in forum JDBC
    Replies: 0
    Last Post: 08-27-2008, 06:52 PM
  4. Socket Closed!
    By rameshraj in forum Networking
    Replies: 0
    Last Post: 05-06-2008, 10:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •