|
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:
- 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).
- 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.
|
|
|
|
|
|
|