Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JasperException - I got this error

 
ks kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ks kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic