dev@glassfish.java.net

Re: deployment error/thread death

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 03 Apr 2007 19:15:38 -0400

Hi Ashish,

there is two possibilities:

(1) There is a thread pool or object in GlassFish that store the
ContextClassloader and try to re-use it. The ContextClassLoader of a web
application is always a WebappClassloader, and that classloader is
marked dead when the application is undeployed. In 9.0, we fixed a bug
in the ORB thread pool related to that problem. This time I suspect the
component that create it is:

> at com.sun.enterprise.instance.SerializedDescriptorHelper.storeSerializedDescriptor(SerializedDescriptorHelper.java:239)
> at com.sun.enterprise.instance.SerializedDescriptorHelper.store(SerializedDescriptorHelper.java:143)
> at com.sun.enterprise.instance.SerializedDescriptorHelper.store(SerializedDescriptorHelper.java:123)
> at com.sun.enterprise.instance.BaseManager.saveAppDescriptor(BaseManager.java:684)
> at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:352)

(2) Your application is holding the classloader. Are you loading classes
using the ContextClassloader and try to re-use that Classloader?

If your application doesn't use or store the ContextClassLoader, that
means one component in GlassFish is doing it. Now to find the component
that does it is far from simple. Last time I've instrumented the JDK
classes to find which component was doing that. Just file a bug if you
think your application is not storing the classloader.

Thanks

-- Jeanfrancois


Ashish Sahni wrote:
> Hi All,
> I've been seeing this error(see attached mail) consistently for the last
> few days.
> It can easily reproduced on re-deployment. If interested I can send you the
> webapp used - its quite large. I have not checked if there's a bug filed
> on this issue already. Let me know if you have any thoughts.
>
> Thanks
> Ashish
>
>
> ------------------------------------------------------------------------
>
> Subject:
> deployment error/thread death
> From:
> ashish_at_hysteria.SFBay.Sun.COM
> Date:
> Tue, 03 Apr 2007 15:11:55 -0700 (PDT)
> To:
> Ashish.Sahni_at_sun.com
>
> To:
> Ashish.Sahni_at_sun.com
>
>
> [#|2007-04-03T15:08:22.618-0700|INFO|sun-appserver9.1|org.apache.catalina.loader.WebappClassLoader|_ThreadID=17;_ThreadName=Thread-29;|PWC1635: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact)|#]
>
> [#|2007-04-03T15:08:22.618-0700|INFO|sun-appserver9.1|org.apache.catalina.loader.WebappClassLoader|_ThreadID=17;_ThreadName=Thread-29;|PWC1635: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact)|#]
>
> [#|2007-04-03T15:08:22.628-0700|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=17;_ThreadName=Thread-29;_RequestID=b4d48310-63bf-4ab9-95ac-99d72a398625;|CORE5064: Error serializing descriptor for application cookbook-test-1.2.2; continuing
> java.lang.ThreadDeath
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> at sun.misc.Unsafe.defineClass(Native Method)
> at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
> at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
> at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:76)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:30)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> at java.lang.Class.newInstance0(Class.java:350)
> at java.lang.Class.newInstance(Class.java:303)
> at java.security.Provider$Service.newInstance(Provider.java:1130)
> at sun.security.jca.GetInstance.getInstance(GetInstance.java:220)
> at sun.security.jca.GetInstance.getInstance(GetInstance.java:147)
> at java.security.Security.getImpl(Security.java:658)
> at java.security.MessageDigest.getInstance(MessageDigest.java:122)
> at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1731)
> at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:52)
> at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:192)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:189)
> at java.io.ObjectStreamClass.writeNonProxy(ObjectStreamClass.java:651)
> at java.io.ObjectOutputStream.writeClassDescriptor(ObjectOutputStream.java:615)
> at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1169)
> at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1127)
> at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1178)
> at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1127)
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> at com.sun.enterprise.deployment.util.ModuleDescriptor.writeObject(ModuleDescriptor.java:242)
> 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.invokeWriteObject(ObjectStreamClass.java:917)
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> at java.util.HashSet.writeObject(HashSet.java:254)
> 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.invokeWriteObject(ObjectStreamClass.java:917)
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> at com.sun.enterprise.instance.SerializedDescriptorHelper.storeSerializedDescriptor(SerializedDescriptorHelper.java:239)
> at com.sun.enterprise.instance.SerializedDescriptorHelper.store(SerializedDescriptorHelper.java:143)
> at com.sun.enterprise.instance.SerializedDescriptorHelper.store(SerializedDescriptorHelper.java:123)
> at com.sun.enterprise.instance.BaseManager.saveAppDescriptor(BaseManager.java:684)
> at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:352)
> at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:217)
> at com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:801)
> at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:168)
> at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:166)
> at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:174)
> at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:892)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
> at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:761)
> at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
> at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
> |#]
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net