5 Replies Latest reply on Jul 18, 2004 12:16 PM by javab0y

    NPE in beginLoadTask when redeploying ear on 3.2.4

    jmeier

      I'm getting a NPE when redeploying my ear on 3.2.4. This applicaiton redeploys without issue on 3.2.3. Has anyone else seen this? Any help or direction would be greatly appreciated. My stack trace is below.

      17:38:14,042 ERROR [BaseModelMBean] Exception invoking method destroy
      java.lang.NullPointerException
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:143)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:1647)
      at java.lang.Class.getDeclaredMethod(Class.java:1254)
      at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1246)
      at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:47)
      at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:348)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.io.ObjectStreamClass.(ObjectStreamClass.java:333)
      at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:253)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1010)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
      at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1411)
      at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:899)
      at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:539)
      at org.apache.catalina.session.StandardManager.unload(StandardManager.java:485)
      at org.apache.catalina.session.StandardManager.stop(StandardManager.java:687)
      at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4474)
      at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1213)
      at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4573)
      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 org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:109)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:140)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:68)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:306)
      at org.jboss.web.WebModule.startModule(WebModule.java:62)
      at org.jboss.web.WebModule.startService(WebModule.java:40)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy31.start(Unknown Source)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:313)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:828)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:460)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

        • 1. More info:
          jmeier

          It appears that the UnifiedLoaderRepository3 being passed in to beginLoadTask is null, and that the class that it is trying to load is java.text.ParseException in one situation, and java.awt.color.ColorSpace in another.

          • 2. Re: NPE in beginLoadTask when redeploying ear on 3.2.4
            starksm64

            This happens when a class loader from the previous deployment is used. Its loader repository has been cleared and any attempt to use that class loader results in an NPE. If you have a testcase open a bug report on sourceforge so I can see if its a jboss issue.

            • 3. Re: NPE in beginLoadTask when redeploying ear on 3.2.4
              jmeier

              I'll submit this as a bug also, but for topic closure, here's what I've found.

              I get the error every time I follow these steps:

              1)Create an war and package it within an ear
              2)Deploy the ear mapped to the default (/) context
              3)Go to a jsp or action that puts a class into the session context. This class must be found either in the WEB-INF/classes or WEB-INF/lib of your war. Just putting a String in the session will not reproduce the error.
              4)Touch the ear file in the deploy directory, or rebuild it, so that it redeploys

              During redeploy is when I see the error:
              [BaseModelMBean] Exception invoking method destroy...
              and the stack trace listed above

              Note: I do not get this error if I remove the object from the session prior to redeploying the application.

              • 4. Re: NPE in beginLoadTask when redeploying ear on 3.2.4
                javab0y

                Yep...I can confirm this problem too on a hot deploy on 3.2.4. I have to fully restart the server to re-dploy. Back to 3.2.3 for now...

                • 5. Re: NPE in beginLoadTask when redeploying ear on 3.2.4
                  javab0y

                  This error occurs in 3.2.5 as well.

                  If all sessions are removed or invalidated prior to redeployment, the error goes away. It would appear this only occurs on the basis of active sessions.

                  This is a bug.