]
RH Bugzilla Integration commented on WFLY-73:
---------------------------------------------
Brad Maxwell <bmaxwell(a)redhat.com> changed the Status of [bug
NPE in RootResourceIterator
---------------------------
Key: WFLY-73
URL:
https://issues.jboss.org/browse/WFLY-73
Project: WildFly
Issue Type: Bug
Components: Domain Management, JMX
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: 8.0.0.Alpha1
Intermittent testsuite failures, e.g.
http://lightning.mw.lab.eng.bos.redhat.com/jenkins/job/as7-param-pull/684...
Log shows this repeatedly:
[0m[33m18:38:11,612 WARN
[org.jboss.remotingjmx.protocol.v2.ServerCommon] (pool-2-thread-12) Unexpected internal
error: java.lang.NullPointerException
at
org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:49)
at
org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:55)
at
org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:55)
at org.jboss.as.jmx.model.RootResourceIterator.iterate(RootResourceIterator.java:39)
at
org.jboss.as.jmx.model.ModelControllerMBeanHelper.getMBeanCount(ModelControllerMBeanHelper.java:103)
at
org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getMBeanCount(ModelControllerMBeanServerPlugin.java:116)
at
org.jboss.as.jmx.PluggableMBeanServerImpl.getMBeanCount(PluggableMBeanServerImpl.java:220)
at
org.jboss.remotingjmx.protocol.v2.ServerProxy$GetMBeanCountHandler.handle(ServerProxy.java:618)
at
org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:152)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
RootResourceIterator.doIterate is reading the resource twice:
{code}
for (ResourceEntry entry : current.getChildren(type)) {
final PathElement pathElement = entry.getPathElement();
final Resource child = current.getChild(pathElement); // why
this call since "entry" and "child" should be the same object
final PathAddress childAddress = address.append(pathElement);
doIterate(child, childAddress);
}
{code}
The problem is "child" is null, which is possible with a dynamic resource. So,
either "entry" should be used, or, if there is some reason for the 2nd read, a
check for null is needed before the recursive doIterate call.