File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes DSRA9110E: Statement is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DSRA9110E: Statement is closed" Watch "DSRA9110E: Statement is closed" New topic
Author

DSRA9110E: Statement is closed

sachin burange
Ranch Hand

Joined: Jun 24, 2008
Posts: 41
While running the job this error occurs randomely.
I am not able to understand why it behves randomely.
connection object is taken from connction pool.

try {
conn_rsweb = rsUtilDBConnections.getRsWebConnection();
stmt_rsweb = conn_rsweb.createStatement();
String sql1 = "query";
try
{
//Here it gives error
rs_rsweb = stmt_rsweb.executeQuery(sql1);
}
catch (SQLException sqe)
{
rs_rsweb = stmt_rsweb.executeQuery(sql1);
}
}catch(Exception e) {}


Regards
Sachin
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

What is frequencey of your job ?

Since you have not posted complete code I just want to know if statement is a class level variable ? where are you closing resultset/statement once your task is complete

Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
Consider Paul's rocket mass heater.
 
subject: DSRA9110E: Statement is closed
 
Similar Threads
Invalid cursor state
Problem loading the class
How to set and get images in Oracle databse
how to insert into 2 different tables
jsp polling