Bug 536564 (RHQ-900) - windows platform failed to run discovery due to NPE
Summary: windows platform failed to run discovery due to NPE
Keywords:
Status: CLOSED NOTABUG
Alias: RHQ-900
Product: RHQ Project
Classification: Other
Component: Agent
Version: 1.1
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-26 01:08 UTC by John Mazzitelli
Modified: 2009-08-28 17:01 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description John Mazzitelli 2008-09-26 01:08:00 UTC
This looks bad.  I do not know exactly what triggered this.  But after I successfully had this agent download a new plugin (the perftest plugin), I asked for it to execute the platform operation "manual discovery".  I noticed my operation never finished, so I checked the logs and saw this (note, this kind of thing worked on all my linux platforms, but failed on my windows platforms):

20:54:54,051 ERROR [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor) - Error in discovery
java.lang.NullPointerException
	at org.rhq.core.pc.plugin.PluginComponentFactory.instantiateClass(PluginComponentFactory.java:119)
	at org.rhq.core.pc.plugin.PluginComponentFactory.getDiscoveryComponent(PluginComponentFactory.java:72)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.pluginDiscovery(AutoDiscoveryExecutor.java:148)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.call(AutoDiscoveryExecutor.java:99)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.run(AutoDiscoveryExecutor.java:88)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
20:54:54,051 ERROR [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor) - Error in discovery
java.lang.NullPointerException
	at org.rhq.core.pc.plugin.PluginComponentFactory.instantiateClass(PluginComponentFactory.java:119)
	at org.rhq.core.pc.plugin.PluginComponentFactory.getDiscoveryComponent(PluginComponentFactory.java:72)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.pluginDiscovery(AutoDiscoveryExecutor.java:148)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.call(AutoDiscoveryExecutor.java:99)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.run(AutoDiscoveryExecutor.java:88)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
20:54:55,714 ERROR [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager) - Failed to start component for Resource[id=513064, type=Windows, key=spawn_40404, name=spawn_40404, version=Win32 5.1] from synchronized merge.
java.lang.NullPointerException
	at org.rhq.core.pc.plugin.PluginComponentFactory.getDiscoveryComponent(PluginComponentFactory.java:65)
	at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:933)
	at org.rhq.core.pc.inventory.InventoryManager.refreshResourceComponentState(InventoryManager.java:1759)
	at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:1585)
	at org.rhq.core.pc.inventory.InventoryManager.synchInventory(InventoryManager.java:629)
	at org.rhq.core.pc.inventory.InventoryManager.handleReport(InventoryManager.java:616)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.call(AutoDiscoveryExecutor.java:113)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.run(AutoDiscoveryExecutor.java:88)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Comment 1 Joseph Marques 2008-09-26 18:57:40 UTC
PluginComponentFactory stores a list of discoveryComponents in a cache.  the cache is initialized to an empty hash during PC initialization.  so, the only way you could have hit NPE on this is if you tried to execute discovery against an agent whose PC wasn't enable...but the fact that you could even submit this command to the agent implies that the PC was up and running.  so, clearly something is borked.  any other info you could add to give hint as to what might have happened here?

Comment 2 Corey Welton 2009-08-25 20:04:30 UTC
QE will try and repro, otherwise close.

Comment 3 Corey Welton 2009-08-28 17:01:35 UTC
QA Closing, unable to repro

Comment 4 Red Hat Bugzilla 2009-11-10 21:19:15 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-900



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