java.lang.IllegalArgumentException thrown by the Session Manager
 Technote (FAQ)
 
Problem
In WebSphere® Application Server, when persistent sessions are enabled and the Web Module is marked as "distributable", the following exception is possible:

java.lang.IllegalArgumentException
at com.ibm.servlet.personalization.sessiontracking.DatabaseSessionData.putValueGuts
at com.ibm.servlet.personalization.sessiontracking.SessionData.putValue
 
Cause
The IllegalArgumentException thrown by DatabaseSessionData.putValueGuts is only possible when persistent sessions are enabled and the Web Module is marked as "distributable." This exception is thrown because the object that is being put into the HTTPSession is not serializable and the Web Module is marked as "distributable."
 
Solution
There are two (2) solutions to the problem:
  1. Ensure that all objects that are to be placed into the HTTPSession are serializable (for example, making sure that the class implements the serializable interface).

  2. If your application is not to be deployed in a distributed servlet container, do not mark the Web Module as "distributable." If a Web Module is distributable it means that it is programmed appropriately to be deployed into a distributed servlet container. WebSphere Application Server then uses this flag to ensure your code is compliant.

    For example, when the Web Module is distributable and you do a putValue when using persistent sessions, the Application Server checks to make sure the object is serializable.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Sessions and Session Management
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1055286
IBM Group: Software Group
Modified date: Feb 25, 2005