0 Replies Latest reply on Nov 19, 2008 9:10 AM by Emanuel Muckenhuber

    NPE deploying TopicService

    Emanuel Muckenhuber Master

      Hi,

      if i try to deploy a simple TopicService with the MessageCounterHistoryDayLimit attribute set, it fails with a NPE.
      It seems that the attribute is set before the destination mbean is started and the serverPeer is set.

      <?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">
      
       <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>
      


      11:39:35,787 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/home/emuckenh/svn/as/trunk/build/output/jboss-5.0.0.GA/server/profileservice/deploy/profileservice-testTopic-service.xml state=PreReal mode=Manual requiredState=Real
      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:595)
      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
      
      


      The stacktrace is from AS5 trunk, which uses JBM 1.4.1.CR1 if i'm not mistaken. But this seems to also affect the EAP branch.

      If someone wants to take a look at that ? :)

      Thanks,
      Emanuel