Bug 676721 - When no partition name is defined in AS instance, metric collection results in NPE
Summary: When no partition name is defined in AS instance, metric collection results i...
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 3.0.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-10 22:31 UTC by Larry O'Leary
Modified: 2022-03-31 04:27 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
EAP 5.0.1 running with default profile JON 2.4 using JBoss AS 5 Plug-In
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 594520 0 urgent CLOSED EAP 5.x running "production" config reports "partitionName" trait as NULL 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBPAPP-4541 0 Major Closed 'partitionName' property on {MCBean:ServerConfig} Profile Service managed component returns a null value on AS 5.x and E... 2015-11-05 18:54:17 UTC

Internal Links: 594520

Description Larry O'Leary 2011-02-10 22:31:16 UTC
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.