• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat is getting crashed and the exception is java.sql.SQLException: org.apache.tomcat.dbcp.dbcp.De

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am having the tomcat server with Oracle database. I am getting the below exception in catalina.out log.


Exception:
===============

java.sql.SQLException: org.apache.tomcat.dbcp.dbcp.DelegatingStatement with address: "oracle.jdbc.driver.T4CStatement@1aec5595" is closed.
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.checkOpen(DelegatingStatement.java:137)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:206)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at EdenBeans.EdenBaseBean.getDropDown(EdenBaseBean.java:1920)
at org.apache.jsp.Customer_jsp._jspService(Customer_jsp.java:2627)

===============

I have the database configuration like this in context.xml
===================

type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@<database ip>"
username="db_username" password="db_password" maxActive="400" maxIdle="100"
maxWait="-1"/>

==================


I am excited why this is happening.. I am done anything wrong with the above configuration..

Please help me on this.. why this exception is coming. and I am not the developer too...

Thanks,
Anil kumar
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The important line in the stack trace is this one:

at EdenBeans.EdenBaseBean.getDropDown(EdenBaseBean.java:1920)



That's the line of code which is trying to use a JDBC statement which has been closed. So that's where you should start looking -- in the getDropDown method of the EdenBeans.EdenBaseBean class at line 1920.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are 2 possible reasons for getting this problem.

One is a program logic error. Since you say you're not a programmer, there's nothing you can do. It will require a programmer to analyze the web application, locate the faulty code and correct it.

The other is that the underlying java Connection object that the delegating connection is proxying for has closed due to an inactivity timeout. That's something you can do something about. There are DBCP options that allow the pool to test a pooled Connection before serving it to a requesting app, and if the Connection has been closed, it will be discarded and replaced with a new connection automatically. That's not a default behavior for Oracle and DBCP, however, and I don't remember the details, but if you read the documentation on Tomcat connection pools you should be able to find information about it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic