users@glassfish.java.net

Autodeploying multiple times causes OutOfMemoryError in PermGen

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Feb 2007 17:47:51 PST

Hello,

I'm having a problem autodeploying my EAR application.
The application is autodeployed fine the first time after glassfish is started, and when I put
an updated version in the domain1\autodeploy directory, it is autoundeployed and then autodeployed.
Fine.
The problem exhibits itself when I autoundeploy and autodeploy my application several times,
maybe more than 10 times. Glassfish throws a OutOfMemoryError and hangs, and even "asadmin stop"
won't work. PermGen memory seems to be running out of free space, but increasing PermGen memory
didn't help.
I'm using build v2-b35 on JDK1.6.0 now, but the problem has been there for quite some time.
I think it was fine until M2. Anyone else having this problem?


[#|2007-02-09T08:13:28.548+0900|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=11;_ThreadName=Timer-4;_RequestID=ae310e80-dbb9-425a-8f30-50078da42e2f;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [FooApp] -- PermGen space
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:364)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:345)
        at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:274)
        at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:188)
        at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:132)
        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:263)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:281)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:542)
        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:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:508)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:489)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:436)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:253)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:361)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:674)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:674)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:674)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:674)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:161)
        at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:392)
        at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:333)
        at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:305)
        at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:200)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:308)
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:318)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:345)
        at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:274)
|#]
[Message sent by forum member 'kmiya' (kmiya)]

http://forums.java.net/jive/thread.jspa?messageID=202780