You're right, the real problem that I was having was the class loader problem when I changed a JSP... not a Serialized object problem... I'll be glad when that one is fixed in JRun... it's really anoying when developing JSP's around a controller Servlet!!!
:) thanks
Matt
Karl Moss wrote:
The serialVersionID doesn't have any bearing to the problem as stated. The
serialVersionID only comes into play when serializing/deserializing objects
whose classes have changed, not to mention that if the serialVersionID was
the problem you would get an InvalidClassException thrown when attempting to
deserialize. The ClassCastException that is being seen is more indicative of
a class loader issue instead of a class serialization issue.Larry is correct, though, that if you using JRun's session persistence
mechanism to serialize/deserialize session objects when a servlet is
reloaded that you may need to look into defining the serialVersionID. This
will only be necessary if you modify the class definition of an object that
is in a session and then modify a servlet; this causes the session data to
serialize/deserialize (JRun serializes the session state, loads the new
servlet, and the deserializes the session state) and, when the old class
info in the original object doesn't match the new class info, may cause an
InvalidClassException.Karl Moss
Allaire, Corp.-----Original Message-----
From: Larry Zappaterrini [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 9:23 AM
To: [EMAIL PROTECTED]
Subject: Re: ClassCastException on passing java bean from servlet to jsp> The workaround is to restart JRun when
> you change a bean or a JSP that loads a
> bean (unless the bean hasn't been loaded
> yet), I think.I think that the solution for this exception is to create a
serialVersionUID member in the Serializable bean or class that you
wish to store in a session. This is easily accomplished using the
serialver tool that comes with the JDK. You run this command with
the full name of the class that you wish to create a UID for. It
outputs the line of code that you should insert into the class file's
source. It is a classloader issue. When you make changes to a class
and recompile, any older versions of that class that are serialized
will not be able to be deserialized as the same class without having
the same serialVersionUID. Does this make sense? I am pretty sure
that this is what is necessary.Larry
----------------------------------------------------------------------------
--
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
begin:vcard n:Goss;Matt tel;fax:919-657-1501 tel;work:919-657-1432 x-mozilla-html:FALSE url:www.rtci.com org:RTCI;Custom Solutions adr:;;201 Shannon Oaks Circle;Cary;NC;27511;US version:2.1 email;internet:[EMAIL PROTECTED] title:Web Developer fn:Matt end:vcard
