JMX NullPointerException is thrown while calling MBeans on EAP

Solution Verified - Updated -

Issue

  • Accessing a JMX object with an asterisk in the domain (for example java*:type=GarbageCollector,*) throws a NPE.
  • We are using 3rd party tool for monitoring and are using a JMX connection and a WARN message occurs anytime the tool polls the server and it does not appear to affect functionality (NPE exception logged).

    WARN  [org.jboss.remotingjmx.protocol.v2.ServerCommon] (pool-2-thread-4745) Unexpected internal error: java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1234) [rt.jar:1.7.0_79]
        at java.util.regex.Matcher.reset(Matcher.java:308) [rt.jar:1.7.0_79]
        at java.util.regex.Matcher.<init>(Matcher.java:228) [rt.jar:1.7.0_79]
        at java.util.regex.Pattern.matcher(Pattern.java:1088) [rt.jar:1.7.0_79]
        at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.accepts(ModelControllerMBeanServerPlugin.java:111)
        at org.jboss.as.jmx.PluggableMBeanServerImpl.queryNames(PluggableMBeanServerImpl.java:803)
        at org.jboss.as.jmx.BlockingNotificationMBeanServer.queryNames(BlockingNotificationMBeanServer.java:133)
        at org.jboss.remotingjmx.protocol.v2.ServerProxy$QueryNamesHandler.handle(ServerProxy.java:1115)
        at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_79]
        at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_79]
        at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [jboss-as-controller-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
        at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
    

Environment

  • Red Hat JBoss Enterprise Application Platform
    • 6
    • 7.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content