This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Closing a statement you left open, please do your own housekeeping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Closing a statement you left open, please do your own housekeeping" Watch "Closing a statement you left open, please do your own housekeeping" New topic
Author

Closing a statement you left open, please do your own housekeeping

jaya kemmannu
Ranch Hand

Joined: Sep 23, 2011
Posts: 83
Hello,

I am getting SQL Exception : "Closing a statement you left open, please do your own housekeeping" . I am properly closing Result Set, Statement, Prepared Statement and Connection in my code. I am confused where the connection is left open :( .

Exception Stack Trace :

2011-10-13 10:19:31,484 WARN [org.jboss.resource.adapter.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping
java.lang.Throwable: STACKTRACE
at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:576)
at org.jboss.resource.adapter.jdbc.WrappedStatement.<init>(WrappedStatement.java:62)
at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:145)
at com.mnp.ossbss.dao.OSSBSSAdapterInsertRecordDAO.updatePortInAck(Unknown Source)
at com.mnp.ossbss.process.InsertPortInMessages.ProcessPortInAck(Unknown Source)
at com.mnp.ossbss.webservice.ProcessOSSBSSMessage.processGenericMessage(Unknown Source)
at com.mnp.ossbss.webservice.ProcessOSSBSSMessage.executeMessage(Unknown Source)
at com.np.sig.npwsimpl.HpnpOssBssAdapterServiceSkeleton.processRequest(Unknown Source)
at com.np.mwfm.modules.SIGWebServiceModule.invoke(SIGWebServiceModule.java:202)
at com.np.mwfm.NPWebServiceNode.nodeEntered(NPWebServiceNode.java:264)
at com.ov.activator.mwfm.engine.WFMEngineWorker._step1(WFMEngineWorker.java:830)
at com.ov.activator.mwfm.engine.WFMEngineWorker.access$300(WFMEngineWorker.java:107)
at com.ov.activator.mwfm.engine.WFMEngineWorker$8.run(WFMEngineWorker.java:1349)
at com.ov.activator.mwfm.engine.EngineWorkerThread.run(EngineWorkerThread.java:90)

Code :



Any guidance on fixing this would really help

Thanks and Reagrds,
Jay





 
 
subject: Closing a statement you left open, please do your own housekeeping
 
Similar Threads
Closed Statement
java.sql.SQLException: Connection handle has been closed and is unusable
java.sql.SQLException: Closed Resultset: next
Resultset not Open?
Problems with encodeURL