[
http://jira.jboss.com/jira/browse/JBAS-5303?page=all ]
Adrian Brock updated JBAS-5303:
-------------------------------
Component/s: JCA service
(was: Logging)
Assignee: (was: Scott M Stark)
JBoss doesn't recognize closing ResultSet by PreparedStatement
close() method
-----------------------------------------------------------------------------
Key: JBAS-5303
URL:
http://jira.jboss.com/jira/browse/JBAS-5303
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA service
Affects Versions: JBossAS-4.0.5.SP1
Environment: Linux; jre 1.5.012
Reporter: Evanildo Batista
In a database query, after ps.executeQuery(), when the PreparedStatement close() is
declared before ResultSet close() the ps.close() closes de ResultSet.
( "... A ResultSet object is automatically closed when the Statement object that
generated it is closed" - ResultSet API doc )
But, when this occur Jboss AS doesn't recognize the close in the ResultSet and shows
this log:
# WARN[20 Feb 2008 08:01:00,107] - Closing a result set you left open! Please close it
yourself.
# java.lang.Throwable: STACKTRACE
# at java.lang.Throwable.<init>(Throwable.java:56)
# at java.lang.Throwable.<init>(Throwable.java:67)
# at
org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(WrappedStatement.java:617)
# at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:237)
# at dao.ProdDAO.getIdProd(ProdDAO.java:1504)
# at dao.ProdDAO.getListaProd(ProdDAO.java:73)
# at dao.ProdDAO.getListaProd(ProdDAO.java:1015)
# at action.ProdAction.buscarProd(ProdAction.java:1032)
# at action.ProdAction.buscarProdutos(ProdAction.java:1082)
# at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
# at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
# at java.lang.reflect.Method.invoke(Method.java:615)
# at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
# at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
# at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
# at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
# at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
# at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
# at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
# at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
# at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
# at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
# at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
# at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
# at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
# at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
# at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
# at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
# at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
# at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
# at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
# at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
# at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
# at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
# at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
# at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
# at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira