Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes IllegalStateException - while passing Resultset Object from one JSP to another!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "IllegalStateException - while passing Resultset Object from one JSP to another!!" Watch "IllegalStateException - while passing Resultset Object from one JSP to another!!" New topic
Author

IllegalStateException - while passing Resultset Object from one JSP to another!!

Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi,
I was trying on the subject sometime back, and then left it due to lack of time.
Just to brief you about the Exception, I remember passing a Resultset object from one JSP to another.I was doing that because the other JSP had the logic to process the records of the Resultset.However, the output showed IllegalStateException.Am not very sure why I was getting this Exception.
I will paste the code here if I find it.
Any ideas as to why this exception was occuring?
Thanks in advance,
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56

  5. [This message has been edited by Desai Sandeep (edited April 26, 2001).]


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
manav kher
Ranch Hand

Joined: Nov 21, 2000
Posts: 98
i am guessing but there could be two reasons
1) since the resultset interface does not implement serializable interface that could be a problem passing it from one jsp to another ...
2) better guess :-)
since a ResultSet is automatically closed when the Statement that gernerated it closes...so if you load a diff jsp maybe the statement is being closed (which in turn closes the resultset)
-manav
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Manav,
My guess is as good as yours
I am trying my level best to capture that code which caused that Exception.However, by any chance is it possible, for this exception to occur, if the request would have been busy
The API doc for the IllegalStateException states :

Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.

This might happen when the HttpServletRequest is serving some other client.Let me know your views on this.
Thanks in advance,

------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IllegalStateException - while passing Resultset Object from one JSP to another!!