Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
manav kher
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic