6 Replies Latest reply on Feb 8, 2008 6:30 PM by mr.colin.daly

    Problem deploying a -beans.xml in a SAR

    brian.stansberry

      There are problems deploying the tc6 clustering cache on trunk. It's deployed via a -beans.xml nested in an expanded .sar. I get errors deploying some of the nested beans in the config as follows; which bean fails seems to vary.

      2006-12-31 17:28:44,527 ERROR [org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer] Error during deployment: jboss:id=tc6-cluster.sar,service=jacc
      org.jboss.deployers.spi.DeploymentException: Error deploying: TomcatClusteringBuddyLocatorConfig
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
       at org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:71)
       at org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:42)
       at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRealDeployer.java:53)
       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:440)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:451)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:451)
       at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
       at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
       at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:403)
       at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:342)
       at org.jboss.Main.boot(Main.java:210)
       at org.jboss.Main$1.run(Main.java:508)
       at java.lang.Thread.run()V(Unknown Source)
      Caused by: java.lang.IllegalStateException: TomcatClusteringBuddyLocatorConfig is already installed.
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:249)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
       at org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:67)
       ... 16 more


      This may be an odd case due to funky packaging. The sar looks like this:

      tc6-cluster.sar
      -- META-INF
      -- -- tc6-cluster-beans.xml
      -- tc6-cluster.aop

      That packaging is a bit of a 4.x legacy and doesn't need to be that way; using a simple directory to logically group the two files is fine, even better:

      tc6-cluster
      -- tc6-cluster-beans.xml
      -- tc6-cluster.aop

      When I shift to this packaging, it seems to deploy without issue. But, the other packaging was working with the Beta1 release, so I want to mention it in case this is a sign of something more fundamental being broken.

        • 1. Re: Problem deploying a -beans.xml in a SAR
          starksm64

          I see the error and will look at it.

          • 2. Re: Problem deploying a -beans.xml in a SAR
            starksm64

            This is a problem with the beans created by the SecurityDeployer. It is not being selective enough about what contexts its processing.

            • 3. Re: Problem deploying a -beans.xml in a SAR
              anil.saldhana

              The issue is not really the creation of any beans (because the security deployer just creates a single JaccPolicy bean).

              There is property level injection of beans in the tc6 setup, the security deployer is trying to process the deployment after the beans have been installed and that is where the issue is.

              The security deployer was quite open ended in the sense, it allowed top level deployments(mainly sars) to have a jacc policy of its own. I will need it to really be strict as to what deployments it will process.

              In the meantime, Brian has told me that he will proceed to adapt his tc6-cache setup to something else.

              • 4. Re: Problem deploying a -beans.xml in a SAR
                kabirkhan

                I get the same error when hot-deploying a .jar with a META-INF/beans.xml from the aop testsuite. (In case you wonder I commented out the aspect from the test):

                19:56:12,593 ERROR [BeanMetaDataDeployer] Error during deployment: jboss:id=aop-mc-defaultannotationtest.jar,service=jacc
                org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.aop:name=Bean
                 at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
                 at org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:71)
                 at org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:42)
                 at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRealDeployer.java:53)
                 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:440)
                 at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:451)
                 at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:451)
                 at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:795)
                 at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:570)
                 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: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.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                 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:585)
                 at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
                 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: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.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
                 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: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.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                 at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:816)
                 at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:417)
                 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:585)
                 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
                 at sun.rmi.transport.Transport$1.run(Transport.java:153)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
                 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
                 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
                 at java.lang.Thread.run(Thread.java:595)
                Caused by: java.lang.IllegalStateException: jboss.aop:name=Bean is already installed.
                 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:249)
                 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
                 at org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:67)
                 ... 59 more
                


                • 5. Re: Problem deploying a -beans.xml in a SAR
                  mr.colin.daly

                  I get this when starting JbossAS 5 Beta4 (revision 69713) with the aspects-1.0.0.jar from the microcontainer examples in the deploy directory i.e not a hot deploy.

                  Colin

                  10:06:28,044 INFO [AspectDeployer] Deploying xml into org.jboss.aop.AspectManager@87a1904 for BaseClassLoader@44157e43{vfsfile:/home/colin/apps/jboss/jboss-5.0.0.Beta4/server/default/deploy/ejb3-interceptors-aop.xml}
                  10:06:28,379 INFO [AppClientScanningDeployer] mainClass = class org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap
                  10:06:28,564 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/home/colin/apps/jboss/jboss-5.0.0.Beta4/server/default/deploy/aspects-1.0.0.jar state=PostClassLoader mode=Manual requiredState=Real
                  org.jboss.deployers.spi.DeploymentException: Error deploying: AspectManager
                   at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
                   at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:73)
                   at org.jboss.system.deployers.TempBeanMetaDataDeployer.deploy(TempBeanMetaDataDeployer.java:48)
                   at org.jboss.system.deployers.TempBeanMetaDataDeployer.deploy(TempBeanMetaDataDeployer.java:35)
                   at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
                   at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                   at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
                   at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
                   at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
                   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
                   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
                   at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
                   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:246)
                   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
                   at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
                   at org.jboss.Main.boot(Main.java:208)
                   at org.jboss.Main$1.run(Main.java:534)
                   at java.lang.Thread.run(Thread.java:595)
                  Caused by: java.lang.IllegalStateException: AspectManager is already installed.
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:525)
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
                   at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:69)
                   ... 23 more
                  


                  • 6. Re: Problem deploying a -beans.xml in a SAR
                    mr.colin.daly


                    ignore that - just read the deployment descriptor and i guess it is trying to deploy the AspectManager in the AS when it is already installed - makes sense for the standalone microcontainer but not the the AS.