Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-484

Repeated Deploys of WAR Generate OOM Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.0-M3
    • 1.0-M5
    • web
    • None
    • WinXP SP2, JDK 1.4.2_05

    Description

      Hello,

      I have just run a test that tests Geronimo's ability to redeploy .war
      files. The results don't look so good, but I'm hoping the info I've
      collected will help expose the problem (whether the problem is with me
      or the server

      I've included the script, .war file, web.xml, and two exception traces
      (one from the deploy client and one from the server) I apologize for
      the length of this post. If there's a better way to include all this
      information, please let me know.

      It appears as if the server is running out of memory. Note that I did
      not alter the native configuration of Geronimo in any way. This is a
      stock M3 download, using JDK 1.4.2_05 on Windows XP SP2.

      It's my expectation that the app server would stay up and running
      indefinitely after redeploys of .war files. Especially this .war file
      since it merely contains a single welcome.jsp. I hope this info is
      helpful, and let me know what else you might need. I'll gladly send
      the script and .war file to others that might want to test this.

      Thanks,
      Seth

      My test script:
      $ cat over-and-over.sh
      while /bin/true; do
      java -jar bin/deployer.jar --user system --password manager deploy ../eclipse/wo
      rkspace/MinimalWebapp/build/minimaltest.war
      sleep 1
      wget -q -O - http://localhost:8080/minimaltest/welcome.jsp > /dev/null
      java -jar bin/deployer.jar --user system --password manager undeploy minimaltest
      sleep 1
      done

      Structure of minimaltest.war:
      $ jar tf ../eclipse/workspace/MinimalWebapp/build/minimaltest.war
      META-INF/
      META-INF/MANIFEST.MF
      WEB-INF/
      welcome.jsp
      WEB-INF/web.xml

      Contents of web.xml:
      $ cat ../eclipse/workspace/MinimalWebapp/web/WEB-INF/web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/
      xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">
      <welcome-file-list>
      <welcome-file>welcome.jsp</welcome-file>
      </welcome-file-list>
      </web-app>

      So, as you can see, it's a very minimal webapp. It doesn't initialize
      anything, nor does it include any 3rd party jars or libs. It doesn't
      even load up any classes, and the welcome.jsp only says "Hello,
      world!"

      After 1434 deploy cycles, we receive this exception from the deploy client:
      ---------------------------------
      Deployment failed
      Server reports: null
      java.lang.IllegalStateException
      at org.apache.geronimo.kernel.Kernel.stopConfiguration(Kernel.java:437)
      at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at mx4j.server.ReflectionMBeanInvoker.invokeImpl(ReflectionMBeanInvoker.java:152)
      at mx4j.server.ReflectionMBeanInvoker.doInvoke(ReflectionMBeanInvoker.java:119)
      at mx4j.server.ReflectionMBeanInvoker.invoke(ReflectionMBeanInvoker.java:54)
      at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:235)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
      at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
      at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
      at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
      at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:222)
      at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:36)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectInvoker.java:98)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSubjectInvoker.java:32)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectInvoker.java:89)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
      at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:151)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnectionSubjectInvoker.java:85)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubjectInvoker.java:79)
      at $Proxy0.invoke(Unknown Source)
      at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:224)
      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:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.apache.geronimo.kernel.config.InvalidConfigException:
      Invalid GBean configuration for geronimo.config:name="minimaltest"
      at org.apache.geronimo.kernel.Kernel.stopGBean(Kernel.java:389)
      at org.apache.geronimo.kernel.Kernel.stopConfiguration(Kernel.java:431)
      ... 39 more
      Caused by: java.lang.reflect.InvocationTargetException
      at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:146)
      at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:823)
      at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
      at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
      at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:112)
      at org.apache.geronimo.kernel.config.ConfigurationStore$$EnhancerByCGLIB$$45c69f36.updateConfiguration(<generated>)
      at org.apache.geronimo.kernel.config.Configuration.doStop(Configuration.java:269)
      at org.apache.geronimo.gbean.jmx.GBeanMBean.doStop(GBeanMBean.java:622)
      at org.apache.geronimo.gbean.jmx.AbstractManagedObject.attemptFullStop(AbstractManagedObject.java:583)
      at org.apache.geronimo.gbean.jmx.AbstractManagedObject.stop(AbstractManagedObject.java:396)
      at org.apache.geronimo.gbean.jmx.GBeanMBean$12.invoke(GBeanMBean.java:1048)
      at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
      at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:844)
      at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
      at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
      at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
      at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
      at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:288)
      at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:283)
      at org.apache.geronimo.kernel.Kernel.stopGBean(Kernel.java:385)
      ... 40 more
      Caused by: java.lang.OutOfMemoryError
      -----------------------------------

      And this exception block occurs in the server log:
      -----------------------------------
      07:53:57,796 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/DeployerSystem which ca
      n not be loaded.
      07:53:57,796 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/DebugConsole which can
      not be loaded.
      07:53:57,796 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/ClientSystem which can
      not be loaded.
      07:53:57,812 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/J2EEDeployer which can
      not be loaded.
      07:53:57,812 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/Client which can not be
      loaded.
      07:53:57,812 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/Secure which can not be
      loaded.
      07:53:58,265 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/System which can not be
      loaded.
      07:53:58,265 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/SystemJMS which can not
      be loaded.
      07:53:58,281 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/Demo which can not be l
      oaded.
      07:53:58,281 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID minimaltest which can not be loaded.
      07:53:58,281 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/Server which can not be
      loaded.
      07:53:58,281 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/DefaultDatabase which c
      an not be loaded.
      07:53:58,281 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/SystemDatabase which ca
      n not be loaded.
      07:53:58,281 ERROR [ConfigurationManagerImpl] [org.apache.geronimo.kernel.config
      .ConfigurationStore$$EnhancerByCGLIB$$45c69f36: geronimo.system:role=Configurati
      onStore,type=Local] defines configID org/apache/geronimo/ActiveMQServer which ca
      n not be loaded.
      07:53:58,312 INFO [Configuration] Stopping configuration minimaltest
      07:53:58,312 WARN [Configuration] Could not unregister child geronimo.server:J2
      EEApplication=null,J2EEServer=geronimo,j2eeType=WebModule,name=minimaltest
      javax.management.InstanceNotFoundException: MBeanServer cannot find MBean with O
      bjectName geronimo.server:J2EEApplication=null,J2EEServer=geronimo,j2eeType=WebM
      odule,name=minimaltest
      at mx4j.server.MX4JMBeanServer.findMBeanMetaData(MX4JMBeanServer.java:49
      1)
      at mx4j.server.MX4JMBeanServer.unregisterMBean(MX4JMBeanServer.java:940)

      at org.apache.geronimo.kernel.Kernel.unloadGBean(Kernel.java:395)
      at org.apache.geronimo.kernel.config.Configuration.doStop(Configuration.
      java:254)
      at org.apache.geronimo.gbean.jmx.GBeanMBean.doStop(GBeanMBean.java:622)
      at org.apache.geronimo.gbean.jmx.AbstractManagedObject.attemptFullStop(A
      bstractManagedObject.java:583)
      at org.apache.geronimo.gbean.jmx.AbstractManagedObject.stop(AbstractMana
      gedObject.java:396)
      at org.apache.geronimo.gbean.jmx.GBeanMBean$12.invoke(GBeanMBean.java:10
      48)
      at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp
      eration.java:142)
      at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:844)
      at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerM
      BeanServerInterceptor.java:218)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
      BeanServerInterceptor.java:121)
      at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(Securit
      yMBeanServerInterceptor.java:86)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
      BeanServerInterceptor.java:121)
      at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
      BeanServerInterceptor.java:121)
      at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invo
      ke(ContextClassLoaderMBeanServerInterceptor.java:205)
      at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
      at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:288)
      at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:283)
      at org.apache.geronimo.kernel.Kernel.stopGBean(Kernel.java:385)
      at org.apache.geronimo.kernel.Kernel.stopConfiguration(Kernel.java:431)
      at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
      ---------------------------------

      Attachments

        1. LogFactoryRelease.txt
          1 kB
          Kevan Lee Miller
        2. minimaltest.war
          0.9 kB
          Seth Ladd
        3. over-and-over.sh
          0.3 kB
          Seth Ladd

        Activity

          People

            djencks David Jencks
            sethladd Seth Ladd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: