1 2 Previous Next 16 Replies Latest reply on Sep 18, 2006 10:50 AM by Adrian Brock

    Minimal now boots

    Adrian Brock Master

      I've got the minimal server booting using the new deployers.

      There is a strange exception at shutdown:

      12:24:06,448 WARN [ServiceClassLoaderDeployer] Error unregistering ucl: org.jboss.mx.loading.UnifiedClassLoader3@e8a021{ url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/minimal/conf/jboss-service.xml ,addedOrder=2} for file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/minimal/conf/jboss-service.xml
      java.lang.NullPointerException
       at org.jboss.mx.loading.UnifiedLoaderRepository3.removeClassLoader(UnifiedLoaderRepository3.java:897)
       at org.jboss.mx.loading.RepositoryClassLoader.unregister(RepositoryClassLoader.java:258)
       at org.jboss.mx.loading.UnifiedClassLoader.unregister(UnifiedClassLoader.java:196)
       at org.jboss.system.deployers.ServiceClassLoaderDeployer.internalRemoveClassLoader(ServiceClassLoaderDeployer.java:163)
       at org.jboss.system.deployers.ServiceClassLoaderDeployer.removeTopLevelClassLoader(ServiceClassLoaderDeployer.java:135)
       at org.jboss.deployers.plugins.deployers.helpers.AbstractTopLevelClassLoaderDeployer.removeClassLoader(AbstractTopLevelClassLoaderDeployer.java:45)
       at org.jboss.deployers.plugins.structure.AbstractDeploymentContext.removeClassLoader(AbstractDeploymentContext.java:346)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:330)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.shutdown(MainDeployerImpl.java:387)
       at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:750)
       at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:732)
       at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.run(ServerImpl.java:721)
      
      


      I don't see why this doesn't happen in jboss-head?
      It also does the double removeClassLoader()
      * When the classloader is unregistered from the MBeanServer
      * When ucl.unregister() is invoked

      Maybe it is just eating the exception?

        • 1. Re: Minimal now boots
          Scott Stark Master

          I fixed that exception. It was a new for loop that snuck in. I don't know why the simpler semantics don't also include checking for null and just bypassing the loop.

          • 2. Re: Minimal now boots
            Scott Stark Master

            We are on to looking at the default configuration and want to get this to the point of only having deployers fail. Currently there are some class loading errors for services that need to be resolved before we flip this over to the trunk:

            09:34:50,199 ERROR [AbstractKernelController] Error installing to Instantiated: name=jboss.remoting:protocol=rmi,service=JMXConnectorServer state=Described mode=Manual requiredState=Configured
            org.jboss.deployment.DeploymentException: Unable to createMBean for jboss.remoting:service=JMXConnectorServer,protocol=rmi
             at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
             at org.jboss.system.ServiceCreator.install(ServiceCreator.java:141)
             at org.jboss.system.microcontainer.InstantiateAction.installAction(InstantiateAction.java:45)
             at org.jboss.system.microcontainer.ServiceControllerContextAction.install(ServiceControllerContextAction.java:46)
             at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
             at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:198)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:320)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:190)
             at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
             at org.jboss.system.ServiceController.install(ServiceController.java:272)
             at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:80)
             at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
             at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
             at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:395)
             at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:406)
             at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:346)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:316)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:235)
             at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
             at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:399)
             at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:338)
             at org.jboss.Main.boot(Main.java:210)
             at org.jboss.Main$1.run(Main.java:488)
             at java.lang.Thread.run()V(Unknown Source)
            Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.mx.remoting.service.JMXConnectorServerService
             at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
             at org.jboss.mx.loading.UnifiedClassLoader.loadClassImpl(UnifiedClassLoader.java:275)
             at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:406)
             at java.lang.ClassLoader.loadClass(Ljava.lang.String;)Ljava.lang.Class;(Unknown Source)
             at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1213)
             at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
             at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
             at org.jboss.system.ServiceCreator.installPlainMBean(ServiceCreator.java:197)
             at org.jboss.system.ServiceCreator.install(ServiceCreator.java:115)
             at org.jboss.system.microcontainer.InstantiateAction.installAction(InstantiateAction.java:45)
             at org.jboss.system.microcontainer.ServiceControllerContextAction.install(ServiceControllerContextAction.java:46)
             at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
             at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:198)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:320)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:190)
             at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
             at org.jboss.system.ServiceController.install(ServiceController.java:272)
             at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:80)
             at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
             at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
             at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:395)
             at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:406)
             at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:346)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:316)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:235)
             at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
             at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:399)
            



            • 3. Re: Minimal now boots
              Scott Stark Master

              All of the services in the conf/jboss-service.xml are getting unloaded due to the failure of the jsr77 service to load due to not finding a MainDeployer:

              09:34:50,153 DEBUG [LocalJBossServerDomain] Initialization failed jboss.management.local:j2eeType=J2EEDomain,name=Manager
              javax.management.InstanceNotFoundException: jboss.system:service=MainDeployer is not registered.

              1. We should get the lookup fixed to ensure all of the conf/jboss-service.xml services are loading. I'll take a look at this today.

              2. With the loading of deployment definitions before creating/starting them, we really need to strip conf/jboss-service.xml down to the minimal static services and bring it more in line with the installer fine grained services breakout. This can wait until we switch to trunk.

              • 4. Re: Minimal now boots
                Adrian Brock Master

                This looks to be the cause of the classloading issues as well.

                The jboss-service.xml classloader is getting removed
                because the deployment failed.

                18:28:01,074 DEBUG [UnifiedLoaderRepository3] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader3@106daba{ url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/conf/jboss-service.xml ,addedOrder=21}
                18:28:01,085 DEBUG [RepositoryClassLoader] Unregistering cl=org.jboss.mx.loading.UnifiedClassLoader3@106daba{ url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/conf/jboss-service.xml ,addedOrder=21}
                18:28:01,085 DEBUG [UnifiedLoaderRepository3] UnifiedLoaderRepository removed(false) org.jboss.mx.loading.UnifiedClassLoader3@106daba{ url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/conf/jboss-service.xml ,addedOrder=21}
                18:28:01,088 DEBUG [ServiceCreator] About to create bean: jboss.mq:service=InvocationLayer,type=HTTP with code: org.jboss.mq.il.http.HTTPServerILService
                18:28:01,089 ERROR [AbstractKernelController] Error installing to Instantiated: name=jboss.mq:service=InvocationLayer,type=HTTP state=Described mode=Manual requiredState=Configured
                org.jboss.deployment.DeploymentException: Unable to createMBean for jboss.mq:service=InvocationLayer,type=HTTP
                
                <snipped/>
                
                Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.mq.il.http.HTTPServerILService
                 at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
                 at org.jboss.mx.loading.UnifiedClassLoader.loadClassImpl(UnifiedClassLoader.java:275)
                 at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:406)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                 at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1213)
                 at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
                 at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
                 at org.jboss.system.ServiceCreator.installPlainMBean(ServiceCreator.java:197)
                 at org.jboss.system.ServiceCreator.install(ServiceCreator.java:115)
                


                • 5. Re: Minimal now boots
                  Scott Stark Master

                  So something needs to register a MainDeployerMBean wrapper around the MainDeployer with the legacy jmx kernel. I guess I was doing this in the previous SARDeployer incarnation. It could also be a feature of the JMXKernel pojo: take a kernel bean and expose it as an mbean. Any preferred way to do this?

                  • 6. Re: Minimal now boots
                    Adrian Brock Master

                    There is a way to do this in the aop/mc integration.
                    You just do:

                    <bean ...>
                     <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(exposedInterface=whatever.class)</annotation>
                    </bean>
                    


                    But this is just proof of concept test code.

                    Another mechanism (without aop)
                    would be to add a BeanJMXDeployer in the deployer list
                    that looks for an annotation (or something else like an XMBean definition)
                    and does the JMX work for the bean.

                    • 7. Re: Minimal now boots
                      Adrian Brock Master

                      The other cause of the classloading problems is that the unpacked
                      deployments url is wrong.

                      19:12:04,289 DEBUG [RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@987a33, cl=org.jboss.mx.loading.UnifiedClassLoader3@12fb0af{ url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/deploy/uuid-key-generator.sar ,addedOrder=0}
                      


                      which should be:

                      url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/deploy/uuid-key-generator.sar/

                      i.e. the contents of the directory not the directory.


                      • 8. Re: Minimal now boots
                        Adrian Brock Master

                        Of course, the AOP/MC integration would also support:

                        @JMX(exposedInterface=MainDeployerMBean.class)
                        public class MainDeployer
                        {
                        ...
                        }

                        • 9. Re: Minimal now boots
                          Scott Stark Master

                           

                          "adrian@jboss.org" wrote:
                          The other cause of the classloading problems is that the unpacked
                          deployments url is wrong.

                          19:12:04,289 DEBUG [RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@987a33, cl=org.jboss.mx.loading.UnifiedClassLoader3@12fb0af{ url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/deploy/uuid-key-generator.sar ,addedOrder=0}
                          


                          which should be:

                          url=file:/home/ejort/mc-vdf-work/build/output/jboss-5.0.0.Beta/server/default/deploy/uuid-key-generator.sar/

                          i.e. the contents of the directory not the directory.


                          We need to restore the TestFileVFS.testDirURLs test then as this was its purpose.


                          • 10. Re: Minimal now boots
                            Scott Stark Master

                             

                            "adrian@jboss.org" wrote:
                            There is a way to do this in the aop/mc integration.
                            You just do:

                            <bean ...>
                             <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(exposedInterface=whatever.class)</annotation>
                            </bean>
                            


                            But this is just proof of concept test code.


                            I'll take a look at this and @JMX.

                            • 11. Re: Minimal now boots
                              Adrian Brock Master

                              I've nearly got default booting.

                              1) MainDeployer
                              I'm just deploying the old MainDeployer in conf/jboss-service.xml
                              so the old subdeployers can create their proxies.

                              2) ServiceDeployer
                              The JCA subdeployer needed this, it creates a proxy on it.
                              So I added this to conf/jboss-service.xml

                              3) Error in JMX undeploys
                              I relaxed this. It no longer causes undeployment.
                              This would be a good idea for the sake of consistency,
                              i.e. the whole deployment either starts or it doesn't.

                              4) MBean dependencies
                              I've added some MBean dependencies (mostly on MainDeployer
                              and Naming) to fix some problems.

                              5) Directories end in /
                              The URI/URLs now do. The VFS paths don't which was what I was
                              trying to fix here.

                              6) Nested jars
                              Fixed a bug where nested jars weren't candiadates for deployments
                              because they were treated jar directories.

                              • 12. Re: Minimal now boots
                                Adrian Brock Master

                                There are three remaining problems (two related)
                                which I'll create separate threads for.

                                • 13. Re: Minimal now boots
                                  Adrian Brock Master

                                  I'll leave these last two to you Scott.

                                  I've got to go shopping (before they shut)
                                  to buy some beer for the poker game tonight. :-)

                                  • 14. Re: Minimal now boots
                                    Adrian Brock Master

                                    The default bootstrap is clean now.

                                    There is one DEBUG message I'm going to look at during shutdown:

                                    2006-09-18 15:52:19,939 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.management.local:type=JSR88DeploymentManager,name=DefaultManager
                                    2006-09-18 15:52:19,953 DEBUG [org.jboss.system.ServiceController] Ignoring destroy request for service: jboss.management.local:type=JSR88DeploymentManager,name=DefaultManager at state DESTROYED
                                    2006-09-18 15:52:19,953 DEBUG [org.jboss.system.ServiceController] removing service: jboss.management.local:type=JSR88DeploymentManager,name=DefaultManager
                                    2006-09-18 15:52:19,954 DEBUG [org.jboss.system.ServiceCreator] Removing mbean from server: jboss.management.local:type=JSR88DeploymentManager,name=DefaultManager
                                    2006-09-18 15:52:19,958 DEBUG [org.jboss.system.ServiceCreator] Error unregistering mbean jboss.management.local:type=JSR88DeploymentManager,name=DefaultManager
                                    javax.management.InstanceNotFoundException: jboss.management.local:type=JSR88DeploymentManager,name=DefaultManager is not registered.
                                     at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:527)
                                     at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
                                     at org.jboss.system.ServiceCreator.uninstall(ServiceCreator.java:309)
                                     at org.jboss.system.microcontainer.InstantiateAction.uninstallAction(InstantiateAction.java:53)
                                     at org.jboss.system.microcontainer.ServiceControllerContextAction.uninstall(ServiceControllerContextAction.java:90)
                                     at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
                                     at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:236)
                                     at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
                                     at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
                                     at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
                                     at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:223)
                                     at org.jboss.system.ServiceController.safelyRemoveAnyRegisteredContext(ServiceController.java:733)
                                     at org.jboss.system.ServiceController.remove(ServiceController.java:549)
                                     at org.jboss.system.deployers.ServiceDeployer.remove(ServiceDeployer.java:154)
                                     at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:112)
                                     at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:43)
                                     at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.undeploy(AbstractSimpleRealDeployer.java:63)
                                     at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.prepareUndeploy(AbstractSimpleDeployer.java:42)
                                     at org.jboss.deployers.plugins.deployer.DeployerWrapper.prepareUndeploy(DeployerWrapper.java:105)
                                     at org.jboss.deployers.plugins.deployment.MainDeployerImpl.prepareUndeploy(MainDeployerImpl.java:375)
                                     at org.jboss.deployers.plugins.deployment.MainDeployerImpl.prepareUndeploy(MainDeployerImpl.java:384)
                                     at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:322)
                                     at org.jboss.deployers.plugins.deployment.MainDeployerImpl.shutdown(MainDeployerImpl.java:438)
                                     at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:776)
                                     at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:758)
                                     at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.run(ServerImpl.java:743)
                                    


                                    But this is probably somebody going around the ServiceController
                                    to unregister the MBean?

                                    1 2 Previous Next