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

Solution Verified - Updated -


  • 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.
            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


  • 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 exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In