Hi Lloyd,
On 10/28/08 10:38 AM, Lloyd Chambers wrote:
> The log message is created when
> org.apache.catalina.session.setAttribute() is called; a series of
> checks is made; none of these emit the Attribute name. This is the one
> in question:
>
> if ((manager != null)
> && manager.getDistributable()
> && !isSerializable(value)) {
> throw new IllegalArgumentException
> (sm.getString("standardSession.setAttribute.iae"));
>
> I don't know how the code could be "shared" here; it's a simple fix,
> but one the web team will have to take up.
I had already replied with a patch.jar earlier, for Satyajit to place
on his/her classpath-prefix.
The diffs are indeed very simple (attached).
I'm in the process of getting permission to apply them to GF v2.1.
Jan
>
> Isn't the object being bound something your app is doing? What about
> using a debugger to set a breakpoint there?
>
> Lloyd
>
>
> On Oct 27, 2008, at 9:41 PM, Satyajit Tripathi wrote:
>
>> Hi there,
>>
>> We have created a GlassFish V2 UR2 cluster with two instances on the
>> same machine and deployed a JavaEE application. After successful
>> login to the app we observed the following Error in the server log file
>> ______________________________________________
>> java.lang.IllegalArgumentException: PWC2788: setAttribute:
>> Non-serializable attribute
>> ______________________________________________
>>
>>
>> Question is : Is there a way in "GlassFish V2 UR2" to find out the
>> name of the Attribute which is causing the issue and is not
>> serializable ? We understand that there is a fix incorporated in
>> GlassFish V3 which will print the Attribute name. Also, recently
>> JLuehe provided a jar file to incoporate in GlassFish V2.1.
>>
>> Can you please share the code for GlassFish V2 UR2 which will print
>> the Attribute name ?
>>
>> Thanks & regards
>> --Satya
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> SATYAJIT TRIPATHI
>> ISV Engineering APAC
>>
>> Sun Microsystems India Private Limited
>> Bangalore 560025
>> DID : +91 80 66937865
>> Mobile: +91 9886019892
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net For
>> additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
Index: java/org/apache/catalina/session/LocalStrings.properties
===================================================================
RCS file: /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/session/LocalStrings.properties,v
retrieving revision 1.4
diff -u -r1.4 LocalStrings.properties
--- java/org/apache/catalina/session/LocalStrings.properties 5 May 2007 05:32:18 -0000 1.4
+++ java/org/apache/catalina/session/LocalStrings.properties 28 Oct 2008 17:42:29 -0000
@@ -87,7 +87,7 @@
standardSession.notSerializable=PWC2785: Cannot serialize session attribute {0} for session {1}
standardSession.removeAttribute.ise=PWC2786: removeAttribute: Session already invalidated
standardSession.sessionEvent=PWC2787: Session event listener threw exception
-standardSession.setAttribute.iae=PWC2788: setAttribute: Non-serializable attribute
+standardSession.setAttribute.iae=PWC2788: setAttribute: Non-serializable attribute with name {0}
standardSession.setAttribute.ise=PWC2789: setAttribute: Session already invalidated
standardSession.setAttribute.namenull=PWC2790: setAttribute: name parameter cannot be null
standardSession.sessionCreated=PWC2791: Created Session id = {0}
Index: java/org/apache/catalina/session/StandardSession.java
===================================================================
RCS file: /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/session/StandardSession.java,v
retrieving revision 1.34
diff -u -r1.34 StandardSession.java
--- java/org/apache/catalina/session/StandardSession.java 5 May 2007 05:32:19 -0000 1.34
+++ java/org/apache/catalina/session/StandardSession.java 28 Oct 2008 17:42:29 -0000
@@ -1633,7 +1633,7 @@
&& manager.getDistributable()
&& !isSerializable(value)) {
throw new IllegalArgumentException
- (sm.getString("standardSession.setAttribute.iae"));
+ (sm.getString("standardSession.setAttribute.iae", name));