dev@glassfish.java.net

Re: 'WEB5003: Exception in handleAfterEvent' after roller deployment

From: Ken Paulsen <ken.paulsen_at_Sun.COM>
Date: Mon, 13 Feb 2006 15:17:36 -0800

Hi Jan,

I tried this but was not successful. The build I am using is not the
most current... how long has this feature been available? The
sun-web.xml did not complain when I added your suggestion, but it didn't
seem to help. Here's the sun-web.xml file I used:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE
Application Server 7.0 Servlet 2.3//EN'
'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>

<sun-web-app>
 <security-role-mapping>
    <role-name>admin</role-name>
    <principal-name>admin</principal-name>
    <group-name>asadmin</group-name>
 </security-role-mapping>
 <locale-charset-info default-locale="en">
        <parameter-encoding default-charset="UTF-8" />
 </locale-charset-info>
* <session-config>
    <session-manager>
        <property name="sessionFilename" value="" />
    </session-manager>
 </session-config>*
 <jsp-config>
        <property name="usePrecompiled" value="false" />
 </jsp-config>
</sun-web-app>

I noticed the following 2 exceptions:

On shutdown:

[#|2006-02-13T15:06:36.977-0800|INFO|sun-appserver-pe9.0|org.apache.catalina.session.ManagerBase|_ThreadID=15;_ThreadName=RMI
TCP Connection(9)-127.0.0.1;|Cannot serialize session attribute
PropertiesTableModel for session 65a90691b6821513c6f6333a828d
java.io.NotSerializableException: java.util.PropertyResourceBundle
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
        at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1813)
        at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1021)
        at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:549)
        at
org.apache.catalina.session.StandardManager.access$100(StandardManager.java:75)
        at
org.apache.catalina.session.StandardManager$PrivilegedDoUnload.run(StandardManager.java:99)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:477)
        at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:717)
        at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4864)
        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1149)
...

On Startup:

[#|2006-02-13T15:06:56.774-0800|SEVERE|sun-appserver-pe9.0|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=a5fb571c-14a6-49f1-ba75-2b6b0292ce8c;|Exception
loading sessions from persistent storage
java.lang.NullPointerException
        at
com.sun.web.ui.model.CCManageChildrenModel.readObject(CCManageChildrenModel.java:545)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
        at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
...

Here's how to reproduce the exception:

1) Start the server
2) Login to admin GUI (i.e. http://localhost:4848 ; enter login/pass)
3) Choose the following from the tree: Resources -> JDBC -> Connection Pools
4) Click "New..."
5) Fill in the first form and click next (i.e. Name: "abc"; pick 1st
Resource Type and first DB Vendor)
6) Stop / Start server and watch log file... you'll see the 2 stack
traces above.

Any suggestions?

Thanks,

Ken

Jan Luehe wrote:

>Ken,
>
>Ken Paulsen wrote On 02/13/06 13:38,:
>
>
>>Amy,
>>
>>You mentioned seeing the exception:
>>
>>[#|2006-02-06T16:12:36.390-0800|SEVERE|sun-appserver-pe9.0|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=c44ca3a1-bc4e-4736-82db-8d1cadfd3bc1;|Exception
>>loading sessions from persistent storage
>>java.lang.NullPointerException
>> at
>>com.sun.web.ui.model.CCManageChildrenModel.readObject(CCManageChildrenModel.java:545)
>>
>>
>>This NPE (which happens during deserialization and I suspect causes the
>>NotSerializableException) happens in Lockhart code. See the following
>>bug for details: 6330859. I haven't seen this in a while... but that
>>may be because I haven't turned on "FINER" lately.
>>
>>Anyway, this bug didn't used to show up because our server didn't use to
>>Serialize session data across restarts. Is there any way to turn off
>>this feature for a specific web app? If so, that would be the easiest
>>way to remove this error (which occurs in the admin GUI app).
>>
>>
>
>you may prevent memory-based sessions from being persisted
>across shutdown/restart by specifying an empty "sessionFilename"
>manager property in your webapp's sun-web.xml, as follows:
>
> <sun-web-app>
> <session-config>
> <session-manager>
> <property name="sessionFilename" value=""/>
> </session-manager>
> </session-config>
> </sun-web-app>
>
>
>Jan
>
>
>
>
>
>
>>Thanks,
>>
>>Ken
>>
>>Amy Roh wrote:
>>
>>
>>
>>
>>>Hi,
>>>
>>>I'm getting the same Runtime exception when I try to logon to roller
>>>app. Only warning log (after changing to log level to "FINE" is "null
>>>Subject used in SecurityContext construction". What can I do to get
>>>more info on this to debug further?
>>>Thanks,
>>>Amy
>>>
>>>[#|2006-02-13T11:02:03.921-0800|WARNING|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|SEC5052:
>>>null Subject used in SecurityContext construction.|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=setPolicyContext;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>Policy Context ID was: roller__roller|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=checkPermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>Generating a protection domain for Permission check.|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=checkPermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>Checking with Principal : nonlogin-principal|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=checkPermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>Codesource with Web URL: file:/roller__roller|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=checkPermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>Checking Web Permission with Principals : nonlogin-principal|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=checkPermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>Web Permission = (javax.security.jacc.WebResourcePermission
>>>/j_security_check POST)|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.921-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.enterprise.security.SecurityContext;MethodName=setCurrent;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|permission
>>>check done to set SecurityContext|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.937-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=hasResourcePermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>hasResource isGranted: true|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.937-0800|FINE|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;ClassName=com.sun.web.security.WebSecurityManager;MethodName=hasResourcePermission;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|[Web-Security]
>>>hasResource perm: (javax.security.jacc.WebResourcePermission
>>>/j_security_check POST)|#]
>>>
>>>
>>>
>>>[#|2006-02-13T11:02:03.937-0800|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=15;_ThreadName=httpWorkerThread-7777-0;_RequestID=e4c9c389-cb4b-482d-b714-fe788648296d;|StandardWrapperValve[default]:
>>>Servlet.service() for servlet default threw exception
>>>
>>>java.lang.RuntimeException: WEB5003: Exception in handleAfterEvent.
>>>
>>>
>>>
>>>Amy Roh wrote:
>>>
>>>
>>>
>>>
>>>>Thanks. Changing to FINE logging, I'm finding the problem boils down
>>>>to o.a.c.realm.GenericPrincipal NotSerializableException. I've seen
>>>>similar postings on tomcat mailing lists. I'll look into this more
>>>>and let you know my findings.
>>>>
>>>>[#|2006-02-06T16:12:36.390-0800|SEVERE|sun-appserver-pe9.0|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=c44ca3a1-bc4e-4736-82db-8d1cadfd3bc1;|Exception
>>>>loading sessions from persistent storage
>>>>java.lang.NullPointerException
>>>> at
>>>>com.sun.web.ui.model.CCManageChildrenModel.readObject(CCManageChildrenModel.java:545)
>>>>
>>>>
>>>>[#|2006-02-06T16:12:43.515-0800|SEVERE|sun-appserver-pe9.0|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=c44ca3a1-bc4e-4736-82db-8d1cadfd3bc1;|IOException
>>>>while loading persisted sessions: java.io.WriteAbortedException:
>>>>writing aborted; java.io.NotSerializableException:
>>>>org.apache.catalina.realm.GenericPrincipal
>>>>java.io.WriteAbortedException: writing aborted;
>>>>java.io.NotSerializableException:
>>>>org.apache.catalina.realm.GenericPrincipal
>>>>
>>>>Vince.Kraemer_at_Sun.COM wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>you may want to follow the advice Jan gave me this morning... see
>>>>>
>>>>>https://glassfish.dev.java.net/servlets/ReadMsg?list=users&msgNo=122
>>>>>
>>>>>It seemed to help me find out more about what is 'going wrong' with
>>>>>my app which uses acecgi for security...
>>>>>
>>>>>vbk
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>
>