1 Reply Latest reply on Jan 5, 2009 7:51 AM by kconner

    NullPointerException when trying to read ESB MBean from Twid

    verszou

      I'm working on setting up monitoring for test and production for our JBoss ESB server 4.4 and have run into something that I think may be a bug. I've set up several services in my ESB service and want to check the MessageCounter for the service.

      To try to see if I could read the number of messages I've tried to use the Twiddle interface:

      ~/jbossesb-server-4.4.GA/bin/twiddle.sh query jboss.esb:category=MessageCounter,deployment=saplink.esb,service-name=InvoicingSAPService


      gives me a line back so it seems I've found the Mbean correctly.

      Then when I try to read it using:

      ~/jbossesb-server-4.4.GA/bin/twiddle.sh get jboss.esb:category=MessageCounter,deployment=saplink.esb,service-name=InvoicingSAPService


      The twiddle service dies with a nullpointer exception in this way:

      13:08:49,032 ERROR [Twiddle] Exec failed
      java.lang.NullPointerException
       at org.jboss.soa.esb.listeners.message.ServiceMessageCounter.getAttributes(ServiceMessageCounter.java:300)
      


      When looking at the JMX Management Console I've noticed that one of the MBean attributes is null:

      InvokeSapInvoicing processing time java.lang.Double R null Property InvokeSapInvoicing processing time


      And looking into the code where the nullpointer occurs it seems that there is no check for a condition where one of the attributes has a null value.

      Is there a bug in this or am I missing something in my Twiddle syntax ?

      Also I'm interested if there is any samples of using the Twiddle interface programmatically. I was thinking along the lines of using a JUnit testcase to throw some data into the ESB and then monitor the throughput - not as a regular unit-test, but just using JUnit to sort of orchestrate a black-box test of the entire ESB setup.