• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

exception thrown in session.invalidate()

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ... ?
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic