1 2 Previous Next 15 Replies Latest reply on Oct 15, 2009 7:38 PM by Jan Uhlir

    NullPointerException while shutting down EmbeddedJBoss Beta3

    Dror Bereznitsky Newbie

      NullPointerException while shutting down EmbeddedJBoss:

      ERROR AspectDeployer - Error during undeploy: vfsfile:XXXXXXXXXXXXXXXXX/classes/deployers/ejb3-deployers-beans.xml
      java.lang.NullPointerException
      at org.jboss.aop.deployers.AspectDeployer.undeploy(AspectDeployer.java:144)
      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalUndeploy(AbstractVFSRealDeployer.java:54)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:187)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1072)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1027)
      at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:333)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1323)
      at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1009)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:627)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:423)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.shutdown(MainDeployerImpl.java:543)
      at org.jboss.embedded.Bootstrap.shutdown(Bootstrap.java:206)


      This happens because aspectManager is set to null, before undeploying AspectManager.
      While debugging I detected that BeanMetaDataDeployer undeployment process is causing this:

      at org.jboss.aop.deployers.AspectDeployer.setAspectManager(AspectDeployer.java:94)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
      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 org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
      at org.jboss.beans.info.plugins.AbstractPropertyInfo.set(AbstractPropertyInfo.java:182)
      at org.jboss.beans.info.plugins.BeanInfoUtil.set(BeanInfoUtil.java:177)
      at org.jboss.beans.info.plugins.AbstractBeanInfo.setProperty(AbstractBeanInfo.java:242)
      at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:70)
      at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
      at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:108)
      at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:88)
      at org.jboss.kernel.plugins.dependency.ConfigureAction.uninstallActionInternal(ConfigureAction.java:59)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstallAction(KernelControllerContextAction.java:167)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstallAction(KernelControllerContextAction.java:46)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
      at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:333)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1,323)
      at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1,009)
      at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:936)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:463)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:426)
      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:80)
      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:42)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:73)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:187)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1,072)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1,065)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1,027)
      at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:333)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1,323)
      at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1,009)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:627)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:423)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.shutdown(MainDeployerImpl.java:543)
      at org.jboss.embedded.Bootstrap.shutdown(Bootstrap.java:206)


        • 1. Re: NullPointerException while shutting down EmbeddedJBoss B
          Ales Justin Master

          Like I said on JIRA, AspectDeployer has been fixed since Beta3, so if you can try current version of it, that would be great.

          • 2. Re: NullPointerException while shutting down EmbeddedJBoss B
            Ales Justin Master

            Or perhaps - looking at the error - might be a configuration error: something in ejb3-deployers-beans.xml is unsetting aspect manager on aspect deployer, while it's still used.
            Where is AspectDeployer configured/described?

            • 3. Re: NullPointerException while shutting down EmbeddedJBoss B
              Dror Bereznitsky Newbie

              Aspect deployer is configured in aspect-deployer-beans.xml:

              <?xml version="1.0" encoding="UTF-8"?>
              
              <!--
               Aspect Deployer
              -->
              <deployment xmlns="urn:jboss:bean-deployer:2.0">
              
               <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.embedded.JBossEmbeddedUCLIntegration"/>
              
               <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
               <constructor>
               <parameter><![CDATA[
               <aop>
               </aop>]]>
               </parameter>
               </constructor>
              
               <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
              
               <property name="enableLoadtimeWeaving">false</property>
               <property name="suppressTransformationErrors">true</property>
               <property name="prune">true</property>
               <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
               <property name="exclude">org.jboss.</property>
               <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
               <property name="optimized">true</property>
               <property name="verbose">false</property>
               </bean>
              
               <!-- Aspect Deployment -->
               <bean name="AspectDeployer" class="org.jboss.aop.deployers.AspectDeployer">
               <property name="type">aop</property>
               <property name="aspectManager"><inject bean="AspectManager" property="aspectManager"/></property>
               </bean>
              
              </deployment>
              


              As I wrote before, while debugging I see that the one who nullify the aspectManager is BeanMetaDataDeployer

              • 4. Re: NullPointerException while shutting down EmbeddedJBoss B
                Ales Justin Master

                 

                "drorb" wrote:

                As I wrote before, while debugging I see that the one who nullify the aspectManager is BeanMetaDataDeployer

                No, that's just because BMDD is undeploying that ejb3-deployers-beans.xml, where it uninstalls some bean that unsets aspect manager.

                So, we're looking for the bean that does that unset. ;-)

                • 5. Re: NullPointerException while shutting down EmbeddedJBoss B
                  Dror Bereznitsky Newbie

                  Sorry, I'm not sure I got you.
                  From the stacktrace and from debugging I see that BMDD is undeploying the AspectDeployer deployment unit.
                  The unsetting of aspectManager is done in the undeployment process by ConfigureAction.uninstallActionInternal(...).

                  • 6. Re: NullPointerException while shutting down EmbeddedJBoss B
                    Ales Justin Master

                     

                    "drorb" wrote:
                    Sorry, I'm not sure I got you.
                    From the stacktrace and from debugging I see that BMDD is undeploying the AspectDeployer deployment unit.
                    The unsetting of aspectManager is done in the undeployment process by ConfigureAction.uninstallActionInternal(...).

                    BMDDeployer is responsible to uninstall BeanMetaData instances from Controller.
                    A BMD corresponds to a bean that is installed in Controller.
                    So, when BMDD does undeploy, that bean is unwinded, meaning that while in ConfigureAction at uninstall phase it nullifies previously set properties, one of them being aspectManager.

                    OK, you can say that it originates from BMDD, but than you can say that it originates from bootstrap classloader. ;-)


                    • 7. Re: NullPointerException while shutting down EmbeddedJBoss B
                      Dror Bereznitsky Newbie

                      Could the problem be the order of undeployment?
                      Does it have any relation to parentFirst vs parentLast undeployment?

                      • 8. Re: NullPointerException while shutting down EmbeddedJBoss B
                        Ales Justin Master

                         

                        "drorb" wrote:
                        Could the problem be the order of undeployment?
                        Does it have any relation to parentFirst vs parentLast undeployment?

                        Dunno.
                        But have we identified that unsetting bean yet?

                        • 10. Re: NullPointerException while shutting down EmbeddedJBoss B
                          Ales Justin Master

                          Better logging - trace level?
                          Or post the ejb3-deployers-beans.xml, might be obvious.

                          • 11. Re: NullPointerException while shutting down EmbeddedJBoss B
                            Dror Bereznitsky Newbie

                            ejb3-deployers-beans.xml

                            <deployment xmlns="urn:jboss:bean-deployer:2.0">
                            
                             <bean name="java:comp/Initializer" class="org.jboss.ejb3.embedded.JavaCompInitializer"/>
                             <bean name="DefaultPersistenceProperties" class="org.jboss.ejb3.DefaultPersistenceProperties"/>
                            
                             <bean name="Ejb3Deployer" class="org.jboss.ejb3.deployers.Ejb3Deployer">
                             <property name="type">ejb3x</property>
                             <property name="kernel">
                             <inject bean="jboss.kernel:service=Kernel"/>
                             </property>
                             <property name="mbeanServer">
                             <inject bean="JMXKernel" property="mbeanServer"/>
                             </property>
                             <property name="defaultPersistenceProperties">
                             <inject bean="DefaultPersistenceProperties" property="properties"/>
                             </property>
                             <property name="cacheFactoryRegistry">
                             <inject bean="EJB3CacheFactoryRegistry"/>
                             </property>
                             <property name="poolFactoryRegistry">
                             <inject bean="EJB3PoolFactoryRegistry"/>
                             </property>
                             <property name="remoteProxyFactoryRegistry">
                             <inject bean="EJB3RemoteProxyFactoryRegistry"/>
                             </property>
                             <property name="persistenceManagerFactoryRegistry">
                             <inject bean="EJB3PersistenceManagerFactoryRegistry"/>
                             </property>
                            
                             <property name="deploymentDescriptorRequired">false</property>
                            
                             <property name="ignoredJarsSet">
                             <set elementClass="java.lang.String">
                             <!-- AlphaCSP add RA to ignored ejb3 scanned deployments list begin -->
                             <value>containerjms-ra.rar</value>
                             <!-- AlphaCSP add RA to ignored ejb3 scanned deployments list end -->
                             <value>snmp-adaptor.jar</value>
                             <value>otherimages.jar</value>
                             <value>applet.jar</value>
                             <value>jcommon.jar</value>
                             <value>console-mgr-classes.jar</value>
                             <value>jfreechart.jar</value>
                             <value>juddi-service.jar</value>
                             <value>wsdl4j.jar</value>
                             <value>commons-collections.jar</value>
                             <value>commons-pool.jar</value>
                             <value>juddi.jar</value>
                             <value>commons-discovery.jar</value>
                             <value>uddi4j.jar</value>
                             <value>axis.jar</value>
                             <value>commons-dbcp.jar</value>
                             <value>jboss-juddiaxis.jar</value>
                             <value>trove.jar</value>
                             <value>javassist.jar</value>
                             <value>jboss-aop-jdk50.jar</value>
                             <value>jboss-aspect-library-jdk50.jar</value>
                             <value>ejb3-persistence.jar</value>
                             <value>commons-validator-1.1.3.jar</value>
                             <value>commons-collections.jar</value>
                             <value>commons-fileupload.jar</value>
                             <value>commons-pool.jar</value>
                             <value>hibernate-entitymanager.jar</value>
                             <value>jboss-ejb3x.jar</value>
                             <value>commons-digester-1.6.jar</value>
                             <value>cglib-2.1.1.jar</value>
                             <value>commons-discovery.jar</value>
                             <value>jboss-annotations-ejb3.jar</value>
                             <value>jaxen-1.1-beta-4.jar</value>
                             <value>hibernate-annotations.jar</value>
                             <value>commons-httpclient.jar</value>
                             <value>commons-logging.jar</value>
                             <value>commons-vfs.jar</value>
                             <value>hibernate3.jar</value>
                             <value>commons-logging-api.jar</value>
                             <value>asm.jar</value>
                             <value>asm-attrs.jar</value>
                             <value>commons-lang-2.0.jar</value>
                             <value>commons-beanutils.jar</value>
                             <value>jboss-ejb3.jar</value>
                             <value>dom4j.jar</value>
                             <value>commons-codec-1.2.jar</value>
                             <value>wsdl4j.jar</value>
                             <value>xmlsec.jar</value>
                             <value>jbossws.jar</value>
                             <value>jboss-bean-deployer.jar</value>
                             <value>jboss-microcontainer.jar</value>
                             <value>jboss-dependency.jar</value>
                             <value>jboss-container.jar</value>
                             <value>tomcat-coyote.jar</value>
                             <value>commons-collections.jar</value>
                             <value>myfaces.jar</value>
                             <value>jstl.jar</value>
                             <value>commons-digester-1.6.jar</value>
                             <value>myfaces-impl.jar</value>
                             <value>commons-beanutils.jar</value>
                             <value>myfaces-jsf-api.jar</value>
                             <value>commons-codec-1.2.jar</value>
                             <value>catalina-optional.jar</value>
                             <value>tomcat-util.jar</value>
                             <value>jasper-compiler.jar</value>
                             <value>commons-el.jar</value>
                             <value>jasper-compiler-jdt.jar</value>
                             <value>tomcat-http.jar</value>
                             <value>catalina-manager.jar</value>
                             <value>jasper-runtime.jar</value>
                             <value>tomcat55-service.jar</value>
                             <value>servlets-invoker.jar</value>
                             <value>catalina.jar</value>
                             <value>naming-resources.jar</value>
                             <value>servlets-default.jar</value>
                             <value>tomcat-ajp.jar</value>
                             <value>commons-modeler.jar</value>
                             <value>tomcat-apr.jar</value>
                             <value>servlets-webdav.jar</value>
                             </set>
                             </property>
                             <depends>AspectLibrary</depends>
                             </bean>
                             <bean name="EJBStage2Deployer" class="org.jboss.ejb3.deployers.EJBStage2Deployer">
                             <depends>AspectLibrary</depends>
                             </bean>
                            
                             <bean name="AppClientParsingDeployer" class="org.jboss.ejb3.deployers.AppClientParsingDeployer">
                             <property name="type">car</property>
                             <depends>AspectLibrary</depends>
                             </bean>
                            
                             <bean name="JBossClientParsingDeployer"
                             class="org.jboss.ejb3.deployers.JBossClientParsingDeployer">
                             <property name="type">car</property>
                             <depends>AppClientParsingDeployer</depends>
                             </bean>
                            
                             <bean name="AppClientScanningDeployer"
                             class="org.jboss.ejb3.deployers.AppClientScanningDeployer">
                             <depends>JBossClientParsingDeployer</depends>
                             </bean>
                            
                             <bean name="Ejb3ClientDeployer" class="org.jboss.ejb3.deployers.Ejb3ClientDeployer">
                             <property name="type">car</property>
                             <property name="kernel">
                             <inject bean="jboss.kernel:service=Kernel"/>
                             </property>
                             <property name="mbeanServer">
                             <inject bean="JMXKernel" property="mbeanServer"/>
                             </property>
                             <depends>AspectLibrary</depends>
                             <depends>AppClientScanningDeployer</depends>
                             </bean>
                            
                             <!-- EJB3 Cache Factory Registry -->
                             <bean name="EJB3CacheFactoryRegistry" class="org.jboss.ejb3.cache.CacheFactoryRegistry">
                             <property name="factories">
                             <!-- Define each of the registered factories -->
                             <map class="java.util.HashMap" keyClass="java.lang.String"
                             valueClass="java.lang.Class">
                             <!-- NoPassivationCache -->
                             <entry>
                             <key>NoPassivationCache</key>
                             <value>org.jboss.ejb3.cache.NoPassivationCacheFactory</value>
                             </entry>
                             <!-- SimpleStatefulCache -->
                             <entry>
                             <key>SimpleStatefulCache</key>
                             <value>org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory</value>
                             </entry>
                             <!-- StatefulTreeCache -->
                             <entry>
                             <key>StatefulTreeCache</key>
                             <value>org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory</value>
                             </entry>
                             </map>
                             </property>
                             </bean>
                            
                             <!-- EJB3 Pool Factory Registry -->
                             <bean name="EJB3PoolFactoryRegistry" class="org.jboss.ejb3.pool.PoolFactoryRegistry">
                             <property name="factories">
                             <!-- Define each of the registered factories -->
                             <map class="java.util.HashMap" keyClass="java.lang.String"
                             valueClass="java.lang.Class">
                             <!-- ThreadlocalPool -->
                             <entry>
                             <key>ThreadlocalPool</key>
                             <value>org.jboss.ejb3.pool.ThreadlocalPoolFactory</value>
                             </entry>
                             <!-- StrictMaxPool -->
                             <entry>
                             <key>StrictMaxPool</key>
                             <value>org.jboss.ejb3.pool.StrictMaxPoolFactory</value>
                             </entry>
                             </map>
                             </property>
                             </bean>
                            
                             <!-- Remoting Proxy Factory Registry -->
                             <bean name="EJB3RemoteProxyFactoryRegistry"
                             class="org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry">
                             <property name="factories">
                             <!-- Define each of the registered factories -->
                             <map class="java.util.HashMap" keyClass="java.lang.String"
                             valueClass="java.lang.Class">
                             <!-- RemoteProxyFactory -->
                             <entry>
                             <key>RemoteProxyFactory</key>
                             <value>org.jboss.ejb3.remoting.RemoteProxyFactory</value>
                             </entry>
                             <!-- IORFactory -->
                             <entry>
                             <key>IORFactory</key>
                             <value>org.jboss.ejb3.iiop.IORFactory</value>
                             </entry>
                             <!-- ServiceRemoteProxyFactory -->
                             <entry>
                             <key>ServiceRemoteProxyFactory</key>
                             <value>org.jboss.ejb3.service.ServiceRemoteProxyFactory</value>
                             </entry>
                             <!-- StatefulClusterProxyFactory -->
                             <!-- <entry>
                             <key>StatefulClusterProxyFactory</key>
                             <value>org.jboss.ejb3.stateful.StatefulClusterProxyFactory</value>
                             </entry>-->
                             <!-- StatefulRemoteProxyFactory -->
                             <entry>
                             <key>StatefulRemoteProxyFactory</key>
                             <value>org.jboss.ejb3.stateful.StatefulRemoteProxyFactory</value>
                             </entry>
                             <!-- StatelessClusterProxyFactory -->
                             <!-- <entry>
                             <key>StatelessClusterProxyFactory</key>
                             <value>org.jboss.ejb3.stateless.StatelessClusterProxyFactory</value>
                             </entry>-->
                             <!-- StatelessRemoteProxyFactory -->
                             <entry>
                             <key>StatelessRemoteProxyFactory</key>
                             <value>org.jboss.ejb3.stateless.StatelessRemoteProxyFactory</value>
                             </entry>
                             </map>
                             </property>
                             </bean>
                            
                             <!-- EJB3 Persistence Manager Factory Registry -->
                             <bean name="EJB3PersistenceManagerFactoryRegistry"
                             class="org.jboss.ejb3.cache.persistence.PersistenceManagerFactoryRegistry">
                             <property name="factories">
                             <!-- Define each of the registered factories -->
                             <map class="java.util.HashMap" keyClass="java.lang.String"
                             valueClass="java.lang.Class">
                             <!-- StatefulSessionFilePersistenceManager -->
                             <entry>
                             <key>StatefulSessionFilePersistenceManager</key>
                             <value>org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManagerFactory</value>
                             </entry>
                             </map>
                             </property>
                             </bean>
                            
                             <bean name="JNDIKernelRegistryPlugin" class="org.jboss.ejb3.kernel.JNDIKernelRegistryPlugin"/>
                            
                             <!-- Persistence Unit deployers -->
                             <bean name="PersistenceUnitParsingDeployer"
                             class="org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer">
                             <property name="type">car</property>
                             </bean>
                            
                            </deployment>
                            


                            • 12. Re: NullPointerException while shutting down EmbeddedJBoss B
                              Ales Justin Master

                              Hmmm ... nothing obvious about that.
                              Let's see the trace log. :-)

                              • 13. Re: NullPointerException while shutting down EmbeddedJBoss B
                                Petr Nejedly Newbie

                                I have the same problem, anyone got a solution to this?

                                Petr

                                • 14. Re: NullPointerException while shutting down EmbeddedJBoss B
                                  kenundrum Newbie

                                  Bump on this topic, is somewhat important to fix IMO. Anyone have an answer yet?

                                  1 2 Previous Next