Skip to navigation

JBoss EAP 5 web application context metrics are not being collected in JBoss ON 3.1.1 due to a NullPointerException in WebApplicationContextComponent.getValues

Updated 2014-01-24T05:40:43+00:00

Issue

  • Currently Active Sessions metric is no longer collected beginning in JBoss Operations Network (ON) 3.1.1.
  • From the agent log we could find the following ERROR message:

    ERROR [ResourceContainer.invoker.daemon-1172] (org.rhq.plugins.jbossas5.WebApplicationContextComponent)- Failed to collect metric 'activeSessions' for {JBossAS5}Embedded Web Application Context Resource with key localhost.
    java.lang.NullPointerException
            at org.rhq.plugins.jbossas5.WebApplicationContextComponent.getValues(WebApplicationContextComponent.java:146)
            at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:662)
    
  • The following metrics always report NaN: rejectedSessions, sessionMaxAliveTime, sessionCounter, expiredSessions, maxActive, sessionAverageAliveTime, and activeSessions

Environment

  • JBoss Operations Network (ON) 3.1.1
  • JBoss Operations Network (ON) 3.1.2
  • JBoss Application Server (AS) 5 plug-in for JBoss ON
  • One or more JBoss application server resources
  • One or more of the following metrics are enabled for one or more resources of type web application context from a JBoss application server: rejectedSessions, sessionMaxAliveTime, sessionCounter, expiredSessions, maxActive, sessionAverageAliveTime, or activeSessions

Subscriber content preview. For full access to the Red Hat Knowledgebase, please log in.

Not a subscriber? Learn more about the benefits of Red Hat Subscriptions.