aspose file tools*
The moose likes JDBC and the fly likes JasperException - I got this error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JasperException - I got this error" Watch "JasperException - I got this error" New topic
Author

JasperException - I got this error

ks kumar
Greenhorn

Joined: Nov 28, 2007
Posts: 6
Hi,
I am using JDTS JDBC driver to establish database connection.
The connection establishment and fetching the data was sucessfull from database.
But, some times i got the below error :



i can't clear this error when i try to fix this problem.
please help me, if any one know the answer, let me know.

thanks and regards,
K.S.Kumar
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
It sounds like that the database connection is closed and you're trying to use this connection. You can check in your code if a connection is closed with the statement isClosed().


java.sql.Connection


The connection could be closed for a lot of reasons.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
ks kumar
Greenhorn

Joined: Nov 28, 2007
Posts: 6
Thanks for your reply.

i have used a separate class file for database connection establishment.
here is the connectionpool file.



here is the query execute method



here is the query calling method




i got this error
java.sql.SQLException: Invalid state, the Connection object is closed.


please tell me what i did error coding in the above coding.

please help if any one know the answer.


Thanks and regads,
K.S.Kumar
 
Consider Paul's rocket mass heater.
 
subject: JasperException - I got this error