2 Replies Latest reply on Nov 20, 2008 4:10 AM by Emanuel Muckenhuber

    profileservice-testTopic-service.xml deployment failures

    Scott Stark Master

      The profileservice-testTopic-service.xml:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <server>
       <mbean xmbean-dd="xmdesc/Topic-xmbean.xml"
       name="jboss.messaging.destination:service=Topic,name=testTopic"
       code="org.jboss.jms.server.destination.TopicService">
       <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.TopicServiceMO)</annotation>
       <attribute name="JNDIName">testTopic</attribute>
       <attribute name="MessageCounterHistoryDayLimit">1</attribute>
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>
      </server>
      


      is failing to deploy with:
      20:40:31,382 ERROR [AbstractKernelController] Error installing to Configured: name=jboss.messaging.destination:name=testTopic,service=Topic state=Instantiated mode=Manual requiredState=Configured
      org.jboss.deployment.DeploymentException: Exception setting attribute MessageCounterHistoryDayLimit on mbean jboss.messaging.destination:service=Topic,name=testTopic
       at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:155)
       at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:99)
       at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:58)
       at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:42)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.system.ServiceController.doChange(ServiceController.java:672)
       at org.jboss.system.ServiceController.install(ServiceController.java:258)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:95)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:293)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:194)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:404)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:547)
       at java.lang.Thread.run(Thread.java:613)
      Caused by: java.lang.NullPointerException
       at org.jboss.jms.server.destination.ManagedTopic.getMessageCounters(ManagedTopic.java:159)
       at org.jboss.jms.server.destination.ManagedTopic.setMessageCounterHistoryDayLimit(ManagedTopic.java:191)
       at org.jboss.jms.server.destination.DestinationServiceSupport.setMessageCounterHistoryDayLimit(DestinationServiceSupport.java:410)
       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.AttributeDispatcher.invoke(AttributeDispatcher.java:136)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanAttributeInterceptor.invoke(ModelMBeanAttributeInterceptor.java:103)
       at org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInterceptor.java:76)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.server.AbstractMBeanInvoker.setAttribute(AbstractMBeanInvoker.java:461)
       at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java:617)
       at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:151)
       ... 40 more
      


      where the NPE is due to the ManagedTopic.setMessageCounterHistoryDayLimit calling ManagedTopic.getMessageCounters which relies on the serverPeer to have been injected. This is broken for configuration. This test appears to just have been added today. Was it working for you Emanuel?


        • 1. Re: profileservice-testTopic-service.xml deployment failures
          Scott Stark Master

          I cleaned up the deployment code in the test layer to properly cleanup the failed test as this was causing every other test to fail due to the previous incomplete deployment.

          We either need
          - a fix from messaging, not likely as the code is ready to go out the door
          - exclude this property
          - use a demand state="Configured" depends:

          <bean name="HAJNDI" class="org.jboss.ha.jndi.HANamingService">
          ...
           <property name="distributedTreeManager">
           <bean class="org.jboss.ha.jndi.impl.jbc.JBossCacheDistributedTreeManager">
           <property name="clusteredCache"><inject bean="HAPartitionCacheHandler" property="cache"/></property>
           <demand state="Configured">HAPartition</demand>
           </bean>
           </property>
          

          I don't think we have mapped this type of dependency onto mbean services, but I'll check.


          • 2. Re: profileservice-testTopic-service.xml deployment failures
            Emanuel Muckenhuber Master

             

            "scott.stark@jboss.org" wrote:
            I cleaned up the deployment code in the test layer to properly cleanup the failed test as this was causing every other test to fail due to the previous incomplete deployment.

            We either need
            - a fix from messaging, not likely as the code is ready to go out the door
            - exclude this property


            Okay thanks for cleaning up the deployment code, i thought i already did the the undeployment
            so that it does not cause any further regressions - that was not the intention.

            Well basically the problem with this attribute was after persisting and restarting AS, as the default attributes are also persisted.

            Maybe we should have a way to exclude attributes or just persist the changed ones.
            But i guess this depends on the MO<->xml marshalling/unmarshalling first.