3 Replies Latest reply on Oct 21, 2008 10:27 AM by emuckenhuber

    console-mgr.sar jars being registered as mbeans?

    starksm64

      For some reason I'm seeing the following type of errors when running the profileservice config:

      19:28:02,819 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/Users/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.GA/server/profileservice/deploy/management/console-mgr.sar/console-mgr-classes.jar
      javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/Users/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.GA/server/profileservice/deploy/management/console-mgr.sar/console-mgr-classes.jar",type=SubDeployment already registered.
       at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
       at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
       at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
       at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
       at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1573)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:726)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:544)
       at java.lang.Thread.run(Thread.java:613)
      


      Why would jars in a sar be seen as mbean deployments? These are just library jars. I'm not seeing this in the default config which is also strange.

        • 1. Re: console-mgr.sar jars being registered as mbeans?
          alesj

           

          "scott.stark@jboss.org" wrote:

          Why would jars in a sar be seen as mbean deployments? These are just library jars.

          I don't think they are treated as plain lib jars.
          They are treated as true deployments - see JARStructure.

          • 2. Re: console-mgr.sar jars being registered as mbeans?
            emuckenhuber

             

            "alesj" wrote:
            "scott.stark@jboss.org" wrote:

            Why would jars in a sar be seen as mbean deployments? These are just library jars.

            I don't think they are treated as plain lib jars.
            They are treated as true deployments - see JARStructure.


            Ah now i can remember talking with Ales once about the "directory feature".

            Changing the loadApplications method in the SerializableDeploymentRepository (copied from the basic profile) seems to fix those errors.

             private void loadApplications(VirtualFile applicationDir)
             throws IOException
             {
             List<VirtualFile> children = applicationDir.getChildren();
             for(VirtualFile vf : children)
             {
             if (vf.isLeaf())
             {
             VFSDeployment vfCtx = loadDeploymentData(vf, DeploymentPhase.APPLICATION);
             String key = vfCtx.getName();
             applicationCtxs.put(key, vfCtx);
             }
             // TODO replace . in the name with isArchive() == false?
             else if (vf.getName().indexOf('.') == -1)
             {
             // recurse if not '.' in name and recursive search is enabled
             loadApplications(vf);
             }
             else
             {
             VFSDeployment vfCtx = loadDeploymentData(vf, DeploymentPhase.APPLICATION);
             String key = vfCtx.getName();
             applicationCtxs.put(key, vfCtx);
             }
             }
             }
            


            • 3. Re: console-mgr.sar jars being registered as mbeans?
              emuckenhuber

               

              "emuckenhuber" wrote:

              Changing the loadApplications method in the SerializableDeploymentRepository (copied from the basic profile) seems to fix those errors.


              Well this only fixes those errors when starting AS, but generates some new for the HDScanner
              (which btw. does not seem to work in the profileservice target anyway), but haven't really looked into that yet.
              Will do that later then...