Bug 1024475 - NPE in JMXDiscoveryComponent.upgrade
NPE in JMXDiscoveryComponent.upgrade
Status: NEW
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
4.9
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-29 14:04 EDT by Elias Ross
Modified: 2013-12-03 13:50 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Elias Ross 2013-10-29 14:04:32 EDT
Description of problem:

Seeing this for some JMX processes I'm monitoring:

Caused by: java.lang.NullPointerException
        at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:122)
        at org.rhq.plugins.jmx.JMXDiscoveryComponent.upgrade(JMXDiscoveryComponent.java:321)


The code is:

            Configuration pluginConfig = inventoriedResource.getPluginConfiguration();
            String connectorAddress = pluginConfig.getSimpleValue(CONNECTOR_ADDRESS_CONFIG_PROPERTY, null);
            JMXServiceURL jmxServiceURL;


Version-Release number of selected component (if applicable): 4.9


How reproducible:

This happened to break when upgrading JMX plugin from an earlier version (4.5.1) to 4.9. But I'm not sure if it was exactly 4.5.1's version or a later version before 4.9 like 4.7 or something.


Steps to Reproduce:
1. Create a JMX/JVM resource in 4.5.1 (?)
2. Update server to 4.9
3. Start the agent under the new version

Actual results:

NullPointerException, resource is marked as down

Expected results:

Resource up, no exception

Additional info:
Comment 1 Elias Ross 2013-12-03 13:50:28 EST
Example stack trace:

2013-12-03 18:47:24,819 ERROR [main] (ResourceUpgradeDelegate)- ResourceUpgradeFacet threw an exception while upgrading resource [Resource[id=454657, uuid=f795127e-623f-4c02-9ecd
-9eeaf5a8ed7e, type={flume}Flume, key=8013, name=JMX Server (8013), parent=xxx, version=1.6.0_30]]
java.lang.reflect.UndeclaredThrowableException
        at $Proxy46.upgrade(Unknown Source)
        at org.rhq.core.pc.inventory.InventoryManager.invokeDiscoveryComponentResourceUpgradeFacet(InventoryManager.java:527)
        at org.rhq.core.pc.upgrade.ResourceUpgradeDelegate.executeResourceUpgradeFacetAndStoreRequest(ResourceUpgradeDelegate.java:285)
        at org.rhq.core.pc.upgrade.ResourceUpgradeDelegate.processAndQueue(ResourceUpgradeDelegate.java:108)
        at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResourceRecursively(InventoryManager.java:3421)
        at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResourceRecursively(InventoryManager.java:3432)
        at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResources(InventoryManager.java:3391)
        at org.rhq.core.pc.inventory.InventoryManager.initialize(InventoryManager.java:252)
        at org.rhq.core.pc.PluginContainer.startContainerService(PluginContainer.java:515)
        at org.rhq.core.pc.PluginContainer.initialize(PluginContainer.java:328)
        at org.rhq.enterprise.agent.AgentMain.startPluginContainer(AgentMain.java:1913)
        at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:665)
        at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:434)
Caused by: java.lang.Exception: Discovery component invocation failed.
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:310)
        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:662)
Caused by: java.lang.NullPointerException
        at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:122)
        at org.rhq.plugins.jmx.JMXDiscoveryComponent.upgrade(JMXDiscoveryComponent.java:321)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:306)
        ... 5 more

Resource configuration is:

[rhq@st11p01ad-rhq003 cli]$ rhq-cli -f config.js id 454657
Remote server version is: 4.9.0 (bb4fa70)
Login successful
 Resource[id=454657, uuid=f795127e-623f-4c02-9ecd-9eeaf5a8ed7e, type={flume}Flume, key=8013, name=JMX Server (8013), version=1.6.0_30]
JMX Server (8013) 10008_:_97581_:_xxx
    type=org.mc4j.ems.connection.support.metadata.J2SE5ConnectionTypeDescriptor
    connectorAddress=service:jmx:rmi:///jndi/rmi://127.0.0.1:8013/jmxrmi

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