5 Replies Latest reply on Mar 16, 2006 10:58 PM by starksm64

    TreeCacheAop integration problem

    starksm64

      If I do not have the tc5-cluster.aop, jboss-aop-jdk50.deployer deployed, the tc5-cluster-service.xml will not deploy. Why ins't this part of the tc5-cluster.aop deployment?

      12:42:38,463 ERROR [MainDeployer] Could not create deployment: file:/C:/tmp/jbos
      s-4.0.4.CR2/server/default/deploy/tc5-cluster-service.xml
      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect
      .UndeclaredThrowableException)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :196)
       at org.jboss.system.ServiceController.install(ServiceController.java:226
      )
       at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy4.install(Unknown Source)
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:334)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:522)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:207)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:280)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:245)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
       at org.jboss.Main.boot(Main.java:200)
       at org.jboss.Main$1.run(Main.java:464)
       at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.reflect.UndeclaredThrowableException
       at org.jboss.system.ServiceCreator.install(ServiceCreator.java:236)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      tor.java:449)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :171)
       ... 81 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/aop/InstanceAdvisor
       at org.jboss.cache.aop.TreeCacheAop.init(TreeCacheAop.java:72)
       at org.jboss.cache.aop.TreeCacheAop.<init>(TreeCacheAop.java:61)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
      orAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
       at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1233)
      



        • 1. Re: TreeCacheAop integration problem
          brian.stansberry

          There are 2 problems here:

          1) TreeCacheAop requires jboss-aop.jar on the classpath. It is one of the library dependencies of standalone JBossCache. In JBoss AS this jar is currently found in jboss-aop.deployer or jboss-aop-jdk50.deployer. The jar could be moved to /server/all/lib, but that removes the ability to hot deploy the aop framework. I don't like somehow packaging the required classes in tc5-cluster.aop, as TreeCacheAop itself has no dependency on the aspects deployed in tc5-cluster.aop. We'd be mixing concerns (plus putting duplicating classes on the classpath).

          2) The "session replication service" (as opposed to the cache used to support it) requires the http session caching aspects defined in tc5-cluster.aop, and thus requires the AOP deployer service. This is a dependency that isn't specified in tc5-cluster-service.xml. That needs to be fixed. Adding the dependency, however, doesn't prevent the exception you report.

          If we don't want to move jboss-aop.jar into /server/all/lib, another option is to at least document the dependency in tc5-cluster-service.xml and provide an easy workaround, e.g.

           <!--
           Deploys an instance of TreeCacheAop. TreeCacheAop is needed for FIELD
           granularity session replication. FIELD granularuty requires the deployment
           of the AOP deployer (i.e. jboss-aop.deployer or jboss-aop-jdk50.deployer).
           -->
           <mbean code="org.jboss.cache.aop.TreeCacheAop"
           name="jboss.cache:service=TomcatClusteringCache">
          
          
           <!-- You can uncomment the following and comment out the above mbean declaration
           if you are not using FIELD granularity session replication and want
           to eliminate the need to deploy the JBoss AOP Deployer
          
           <mbean code="org.jboss.cache.TreeCache"
           name="jboss.cache:service=TomcatClusteringCache">
           -->
          
           <depends>jboss:service=Naming</depends>
           <depends>jboss:service=TransactionManager</depends>
           <!-- FIELD granularity support requires the AOP deployer. This
           dependency can be commented out if FIELD granularity is not
           used and the plain TreeCache mbean declaration is used above -->
           <depends>jboss.aop:service=AspectDeployer</depends>
          
           .........
          


          • 2. Re: TreeCacheAop integration problem
            brian.stansberry

            The packaging of all this stuff isn't clean. Besides the jboss-aop.jar issue, we have 3 top-level deployments (jbossweb-tomcat55.sar, tc5-cluster-service.xml and tc5-cluster.aop) when the reality is we have 3 nested services with the parent dependent on the child.

            • 3. Re: TreeCacheAop integration problem
              starksm64

              For now I'm just trying to get the dependencies straight in terms of what belongs in the web-cluster pack of the installer. Having a dependency on aop-deployer for this is ok. At a minimun it seems that the tc5-cluster-service.xml should be a tc5-cluster.sar with the tc5-cluster.aop embedded?

              • 4. Re: TreeCacheAop integration problem
                brian.stansberry

                Yes, that is my inclination. I think then embedding that inside jbossweb-tomcat55.sar would be too confusing for people. Practically every clustering support case ends up asking, "please attach tc5-cluster-service.xml". "Please attach the jbossweb-tomcat55.sar/tc5-cluster.sar/META-INF/jboss-service.xml file" sounds like a nightmare waiting to happen.

                Are you thinking in terms of wanting this cleaned up for 4.0.4.CR2?

                • 5. Re: TreeCacheAop integration problem
                  starksm64

                  Yes, I'll do it after testing the installer.