Bug 676721 - When no partition name is defined in AS instance, metric collection results in NPE
When no partition name is defined in AS instance, metric collection results i...
Status: NEW
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
3.0.0
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-10 17:31 EST by Larry O'Leary
Modified: 2012-03-15 11:12 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
EAP 5.0.1 running with default profile JON 2.4 using JBoss AS 5 Plug-In
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP-4541 Major Closed 'partitionName' property on {MCBean:ServerConfig} Profile Service managed component returns a null value on AS 5.x and E... 2015-11-05 13:54 EST

  None (edit)
Description Larry O'Leary 2011-02-10 17:31:16 EST
If I run JBoss EAP/AS default profile - so no partition name is specified then JON GUI will show "nothing found" in "Cluster Partition Name" but agent log file will be filled up with the exceptions like:

ERROR [ResourceContainer.invoker.daemon-9] (org.rhq.plugins.jbossas5.ApplicationServerComponent)- Failed to obtain metric 'MCBean|ServerConfig|*|partitionName'.
java.lang.NullPointerException
	at org.rhq.plugins.jbossas5.util.ManagedComponentUtils.getSimplePropertyValue(ManagedComponentUtils.java:83)
	at org.rhq.plugins.jbossas5.ApplicationServerComponent.getMetric(ApplicationServerComponent.java:544)
	at org.rhq.plugins.jbossas5.ApplicationServerComponent.getValues(ApplicationServerComponent.java:248)
	at sun.reflect.GeneratedMethodAccessor68.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:525)
	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:619)


If we run JBoss EAP/AS using "all" or "production" profile then this exception is not logged (even if we don't specify partition name as an argument) and in this case JON will show "DefaultPartition" as "Cluster Partition Name". If we run JBoss with the specified partition name then this will be taken as "Cluster Partition Name" - and all this seems fine (no exceptions in the log file).

...

This appears to be related to Bug 594520 and JBPAPP-4541. The problem is, the NPE should just not be logged in the event that the AS instance is returning a null object or the object could not be found.

Note You need to log in before you can comment on or make changes to this bug.