Red Hat Bugzilla – Bug 848030
NullPointerException during discovery for [Cache] Resources, EAP5.1.2
Last modified: 2013-08-31 06:13:18 EDT
Created attachment 604267 [details]
Description of problem:
Version-Release number of selected component (if applicable):
Build Number: f546515:4eb3f2c
Steps to Reproduce:
1. clean installation of JON with jon-plugin-pack-eap-3.1.1.ER2 prepared and running
2. EAP5.1.2 is running with 'all' profile (./run.sh -c all)
3. import eap resource
2012-08-14 13:11:18,400 WARN [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Cache] Resources - failed after 1 ms.
java.lang.Exception: Discovery component invocation failed.
Caused by: java.lang.NullPointerException
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
agent log attached
Can you describe how to get the cache set up, to run into the above issue?
I can see the place of the problem in the code, but would need a running instance of course to replicated.
Is this on Oracle btw?
Line 83 should probably be changed to
beanName += ((jmxName==null || jmxName.equals("")) ? "" : "," + jmxName);
as jmxName can probably be null - especially on Oracle, which treats empty strings as null. And the default config entry is:
<c:simple-property name="jmx-resource" default=""/>
This property is indeed null.
In addition to just fixing the NPE, it was needed to also put the jmx-name into the plugin configuration of the resource. Otherwise the inventory tab's connection properties would have complained that no jmxName is set.
As the resource of type Cache has no jmxName (it basically forms the base name), it is marked as optional.
(In reply to comment #1)
> Can you describe how to get the cache set up, to run into the above issue?
No set up was done, just clean installation of EAP5.1.2 was running with 'all' profile (./run.sh -c all)
> I can see the place of the problem in the code, but would need a running
> instance of course to replicated.
> Is this on Oracle btw?
No, postgres was used.
Build Number: d428376
Bulk close of old bugs in VERIFIED state.