0 Replies Latest reply on Mar 20, 2006 12:03 PM by tomerbd2

    Adding description to a schedulable class

      Hi

      I know how to add description to properties in mbeans (xmbeans) however when i'm using a schedulable class i do want to add description to all the properties however i dont know how to do this, i tried to add an xmbean however then i receive nullpointerexception

      I have the following mbean class


      public class LicenseManager implements Schedulable...

      With the following mbean code:

      <mbean code="org.jboss.varia.scheduler.Scheduler" name="MessagingAS:service=LicenseCheckScheduler" xmbean-dd="" >
      <attribute name="StartAtStartup">true</attribute>
      <attribute name="SchedulableClass">messaging_as.util.license.LicenseManager</attribute>
      <attribute name="SchedulableArguments"/>
      <attribute name="SchedulableArgumentTypes"/>
      <attribute name="DateFormat">HH:mm</attribute>
      <attribute name="InitialStartDate">01:30</attribute>
      <attribute name="SchedulePeriod">86400000</attribute>
      <attribute name="InitialRepetitions">-1</attribute>


      <depends>jboss:service=Naming</depends>
      <xmbean>
      <description>MAS path related properties</description>
      <class>messaging_as.util.license.LicenseManager</class>
      <attribute access="read-write" getMethod="getStartAtStartup" setMethod="setStartAtStartup">
      <name>StartAtStartup</name>
      <description></description>
      <type>java.lang.Boolean</type>
      </attribute>
      <attribute access="read-write" getMethod="getSchedulableClass" setMethod="setSchedulableClass">
      <name>SchedulableClass</name>
      <description></description>
      <type>java.lang.String</type>
      </attribute>
      <attribute access="read-write" getMethod="getSchedulableArguments" setMethod="setSchedulableArguments">
      <name>SchedulableArguments</name>
      <description></description>
      <type>java.lang.String</type>
      </attribute>
      <attribute access="read-write" getMethod="getSchedulableArgumentTypes" setMethod="setSchedulableArgumentTypes">
      <name>SchedulableArgumentTypes</name>
      <description></description>
      <type>java.lang.String</type>
      </attribute>
      <attribute access="read-write" getMethod="getDateFormat" setMethod="setDateFormat">
      <name>DateFormat</name>
      <description></description>
      <type>java.lang.String</type>
      </attribute>
      <attribute access="read-write" getMethod="getInitialStartDate" setMethod="setInitialStartDate">
      <name>InitialStartDate</name>
      <description></description>
      <type>java.lang.String</type>
      </attribute>
      <attribute access="read-write" getMethod="getSchedulePeriod" setMethod="setSchedulePeriod">
      <name>SchedulePeriod</name>
      <description></description>
      <type>java.lang.Long</type>
      </attribute>
      <attribute access="read-write" getMethod="getInitialRepetitions" setMethod="setInitialRepetitions">
      <name>InitialRepetitions</name>
      <description></description>
      <type>java.lang.Integer</type>
      </attribute>
      </xmbean>

      </mbean>


      and this is the exception i get when i add to it xmbean descriptions


      17:35:06,384 INFO [ServiceConfigurator] Problem configuring service MessagingA
      S:service=LicenseCheckScheduler
      org.jboss.deployment.DeploymentException: Exception setting attribute javax.mana
      gement.Attribute@7bf4c3 on mbean MessagingAS:service=LicenseCheckScheduler; - ne
      sted throwable: (java.lang.NullPointerException)
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
      .java:490)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
      va:315)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      tor.java:160)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :114)
      at org.jboss.system.ServiceController.install(ServiceController.java:198
      )
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:782)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
      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:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
      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:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
      at org.jboss.Main.boot(Main.java:145)
      at org.jboss.Main$1.run(Main.java:399)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
      at org.jboss.mx.server.AttributeDispatcher.dispatch(AttributeDispatcher.
      java:38)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.interceptor.ModelMBeanAttributeInterceptor.invoke(ModelM
      BeanAttributeInterceptor.java:63)
      at org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInt
      erceptor.java:70)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.setAttribute(AbstractMBeanIn
      voker.java:375)
      at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java
      :455)
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
      .java:486)
      ... 83 more