-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.sql.SQLException: Closed Connection
PostPosted: Wed Mar 25, 2009 4:22 pm 
Newbie

Joined: Wed Mar 25, 2009 4:11 pm
Posts: 1
I'm troubleshooting this jsp application which runs in tomcat with Hibernate for the data access layer.

Here's my data source config.
Code:
<Context path="/">
        <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="localhost_PandF_log." suffix=".txt" timestamp="true" />
        <Resource name="jdbc/PandFDatabase"
                auth="Container" type="javax.sql.DataSource"                factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
                driverClassName="oracle.jdbc.OracleDriver"
                username="username"
                url="jdbc:oracle:thin:@hostname:1521:borpwap"
                password="passwd"
                removeAbandoned="true"
                maxActive="30"
                maxIdle="10"
                maxWait="1000"
                removeAbandonedTimeout="60"
                logAbandoned="true"
                testOnBorrow="true"
                testOnReturn="true"
                validationQuery="select 1 from dual"/> </Context>


After the app has been running for a while I keep getting a Closed connection exception in the tomcat logs. Its a hit and miss issue. When I reload the jsp page it works fine sometimes. Does anyone know what environment config changes could fix this issue?

I suspect the app could be using stale connections and I see gnarly code without any try catch finally while handling DB sessions. At this point, I dont think I can change code cos that may mean a re-write of this app. I'm looking for a config change in the environment that could possibley alleviate this issue.
Code:
7358762 [TP-Processor8] WARN  org.hibernate.util.JDBCExceptionReporter  - SQL Error: 17008, SQLState: null
7358762 [TP-Processor8] ERROR org.hibernate.util.JDBCExceptionReporter  - Closed Connection
7358774 [TP-Processor8] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/prod/projects].[jsp]  - Servlet.service() for servlet jsp threw exception
java.sql.SQLException: Closed Connection
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.