Did you happend to find the solution for this issue. I am running into 
something similar to this. I have my EJB's and also some custom class which 
access the database. Both are using JNDI and are returning the connection back 
to the pool after creating the ResultSet(by closing the connection). I think 
that only the ResultSet is closed when we explictly tell it to close by calling 
rs.close(), or else if we close the statement. But by closing the Connectin 
object i never thought that it will close the ResultSet.
My problem here is the in the custom code where i access the database i do a 
JNDI lookup from the pool and then use this Connection to query the database (I 
tried closing and keeping open the Connection object). But when i try to do 
rs.next() i get an exception saying
'Operation not allowed after ResultSet closed'

I am using JBoss 4.0.2 and this code worked perfectly in JBoss 3.2.3 which was 
my app server and now i am trying to migrate to JBoss 4.0.2.

12:58:36,544 ERROR [ApplicationVersionBean] [select name, version_number from 
system_components order by name]
12:58:36,700 ERROR [ApplicationVersionBean] java.sql.SQLException: Operation 
not allowed after ResultSet closed
        at com.mysql.jdbc.ResultSet.checkClosed(ResultSet.java:639)
        at com.mysql.jdbc.ResultSet.next(ResultSet.java:6116)
        at 
org.jboss.resource.adapter.jdbc.WrappedResultSet.next(WrappedResultSet.java:520)
        at 
com.abs.compliancepro.application.utility.ApplicationVersionBean.retrieveDatabaseVersions(ApplicationVersionBean.java:94)
        at 
com.abs.compliancepro.application.utility.ApplicationVersionBean.(ApplicationVersionBean.java:39)
        at 
com.abs.compliancepro.application.utility.ApplicationVersionBean.getReference(ApplicationVersionBean.java:47)
        at org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:75)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238)

Please help,

Thanks in advance,
Jobby


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913131#3913131

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913131


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to