IllegalStateException - while passing Resultset Object from one JSP to another!!
Joined: Apr 02, 2001
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 email@example.com
Sun Certified Java ProgrammerScored 93 per cent
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
[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>
Joined: Nov 21, 2000
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
Joined: Apr 02, 2001
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,