• Post Reply Bookmark Topic Watch Topic
  • New Topic

exception thrown in session.invalidate()  RSS feed

 
Mike Sever
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I encountered the below exception displayed in page when calling "session.invalidate()" in jsp file even putting into the block "try...catch(Exception ex)...", any solution to this issue?
Env: was 6.0
Thanks in advance!



[BSouther: Added line breaks to error message]
[ January 03, 2007: Message edited by: Ben Souther ]
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like a session dump. What is the root cause of the exception and the exception type ? Which container are you using ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The phrase:

default_host non-serializable app specific session data


makes me wonder if you have stored a reference to a non-serializable object in the session.

Bill
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you help out us slower rustlers .... Is it bad news to add a reference to non-serializable object to the session? I know that such objects can't be moved from one JVM to another, but didn't know that there would be other problems ... ?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the applicatio deployed in a clustered environment? If it is, then a non-serializable object would definitely be a problem.

What is your environment? Looks like it's using proactive session serialization, or perhaps passivating the session or something.

-Cameron
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat's persistent sessions depend on sessions being serializable.
If any object bound directly or indirectly to session is not serializable you might have problems shutting down or restarting your container.

In general, its a good idea to make sure all session data is serializable.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet engines are allowed to serialize a session any time they want to - presumably for memory management or persistence or whatever - it is out of your control.

Therefore, to ensure portability and avoid mystery bugs, ensure that all references you store in a session refer to serializable objects.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!