wood burning stoves 2.0*
The moose likes JForum and the fly likes ResultSet is closed ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "ResultSet is closed !" Watch "ResultSet is closed !" New topic
Author

ResultSet is closed !

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
java.lang.reflect.InvocationTargetException: ResultSet is closed

i get this error when i run JForum .what's the prob?

[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You already asked it:

http://www.coderanch.com/t/574426

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Raphael,

i hav already asked it ..but i dont find it in forum topic..so asked again,

where i'll get the error file in tomcat?.so i will put it

i hav created a datasource and in database URL i changed like,

connectionString = jdbc: odbc:myDSname

my datasource connecting to database easely ..but when forum runs,getting error.

i think servlet takes the datasource from properties file .so my custom datasource may work.i m not gettin the trick?. what's ur thoughts ?.



[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I *really* need the stack trace to help you.

This error occurs when you close the ResultSet and then try to execute some other code using this closed result set. What changes have you made to the code? you can send the changes to my email, so I can take a look ( but please, just send the files you changed ).

Anyway, don't forget the stack trace.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I simpley donno how to put the stack tracce into a file.OR where will i get the error file in tomcat.

i hav'nt changed ur code a bit.it's on it's original form ,i donno where the error is coming,if i know that i can easely put the stacktracce into a file.but i dont changed ur code a bit.

do u tell me how to call ur code as a servlet?.. mean URL..

I dont hav enough time now to study ur code now,coz deadline tension.so i m asking.i think it's simple ones for u.
[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
It may be easy for me if I can get the stack trace.

When this error appears to you, what error message is displayed on the browser? take a print screen if you want. Also, you can get the stack trace on tomcat's log files.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:It may be easy for me if I can get the stack trace.

When this error appears to you, what error message is displayed on the browser? take a print screen if you want. Also, you can get the stack trace on tomcat's log files.

Rafael


The brawer diaplays JForum window.and within JForum panel ,like post panel(or table or grid) an error message exactly like this is coming nothin more .and JForum icon and titles are displaying as usual.but in POST area only error message as follows.

java.lang.reflect.InvocationTargetException: ResultSet is closed.

i hav checked Tomcat log file(\Tomcat ROOT\logs).but i dont fine one that i needed.


[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok..

you get an exception sometime, right?!.. and, when you get the error, you can see many error in the screen, right?!..

When you get the error, open the page source code ( for example, right mouse button click -> show source code ) and sent it to my email, so then I can take a look.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JForum</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="jforum, java forum, forum, rafael steil, bulletin board, java bb, javabb, java discussion forum, discussion forum, java, j2ee">
<base href="http://localhost:8080/JForum-RC2/">
<STYLE type=text/css>@import url( templates/default/style.css );</STYLE>
</head>

<body>
<table border="0"> <tr> <td> <table border=0> <tr> <td></td> <td ><SPAN class=maintitle>JForum</SPAN> - <SPAN class=gen>A Java based forum system
  </SPAN> <table border=0> <TBODY> <tr> <td noWrap >  <SPAN class=mainmenu>  Search   <SPAN class=mainmenu>  Back to home page  Register / </SPAN> Login  </SPAN> </td> </tr> </TBODY> </table> </td> </tr> <TBODY> </TBODY></table></td> </tr> <tr> <td><style type="text/css"> @import url( style.css ); </style> <table border="0" > <tr> <td class="bodyline"> <table border="0" > <tr> <td class="nav">Forum Index</td> </tr> </table> <table class="forumline" border="0"> <tr> <th class="thHead" >Information</th> </tr> <tr> <td class="row1"><table border="0"> <tr> <td> </td> </tr> <tr> <td ><span class="gen">java.lang.reflect.InvocationTargetException: ResultSet is closed</span></td> </tr> <tr> <td> </td> </tr> <tr> <td > Forum Index </td> </tr> </table></td> </tr> </table> </td></tr> </table></td> </tr> <tr> <td > <SPAN class=copyright>Powered by JForum 1.0 - RC 2 � 2004 - Rafael Steil</SPAN>
<!--<img src="https://sourceforge.net/sflogo.php?group_id=15940&type=1" border="0">--> </td> </tr> </table>
</body>
</html>
<!-- <br /> java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:324) <br /> at net.jforum.Command.process(Command.java:79) <br /> at net.jforum.JForum.service(JForum.java:461) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) <br /> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) <br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) <br /> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) <br /> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) <br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) <br /> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) <br /> at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) <br /> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) <br /> at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) <br /> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) <br /> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) <br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) <br /> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) <br /> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) <br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) <br /> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) <br /> at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) <br /> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) <br /> at java.lang.Thread.run(Thread.java:536) <br /> Caused by: java.sql.SQLException: ResultSet is closed <br /> at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(JdbcOdbcResultSet.java:6453) <br /> at sun.jdbc.odbc.JdbcOdbcResultSet.clearWarnings(JdbcOdbcResultSet.java:1747) <br /> at sun.jdbc.odbc.JdbcOdbcResultSet.close(JdbcOdbcResultSet.java:1452) <br /> at net.jforum.drivers.mysql.ForumModel.getTotalMessages(ForumModel.java:364) <br /> at net.jforum.view.forum.ForumVH.list(ForumVH.java:145) <br /> ... 36 more <br /> <br /> -->
[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Now you got it

Well, I checked the source and cannot see any evident error for now.. But I will take a closer look.

Anyway, while am checking this, why don't you get the RC3 release and install it? RC2 is out of date. I have changed the database driver as well.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
mysql-4.1.1-alpha
[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Same error with RC3


[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks Shaba.. it is really bizarre this error.

What mysql version are you using?

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hhmm.. ok..
I have 4.0.x

I will get the alpha version to test.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I didn't forgot you ( hhm, this phrase smells )

The error you are getting is in cases like



it should be



But, at least mysql 4.0.x, accept both versions. While I don't update the code and get mysql ( I also have my regular job ), you could try:

:arrow: Get mysql 4.0.x and try with jforum
:arrow: hack the source: to to the line where the exception is thrown and change the code to close the result set before the statement..

I'm not sure if the problem is this, but we must try..

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
how to compile the source ?.which is the main class?

JForum.java??


[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
shaba wrote:how to compile the source ?.which is the main class?

JForum.java??




there is no main class. Just compile all java classes.. Tomcat will find the correct servlet given the configuration in web.xml

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Nope.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:
shaba wrote:how to compile the source ?.which is the main class?

JForum.java??




there is no main class. Just compile all java classes.. Tomcat will find the correct servlet given the configuration in web.xml

Rafael


compiling all classes?.is classes are not interlinked?.i mean when i compile JFroum.java,all classes will become compiled??
[originally posted on jforum.net by shaba]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Raphael,

do u correct the error?

i cant change my mysql server.it's fixed.no choice for me.

shaba
[originally posted on jforum.net by shaba]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet is closed !