Bug 783942 - NPE in DriftManager when called from Standalone PC
Summary: NPE in DriftManager when called from Standalone PC
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: drift
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: John Sanda
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-23 10:18 UTC by Heiko W. Rupp
Modified: 2013-09-01 19:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-01 19:22:48 UTC
Embargoed:


Attachments (Terms of Use)
A patch that works for me (1.50 KB, patch)
2012-01-23 10:31 UTC, Heiko W. Rupp
no flags Details | Diff
A patch that works for me (1.95 KB, patch)
2012-01-23 11:12 UTC, Heiko W. Rupp
no flags Details | Diff

Description Heiko W. Rupp 2012-01-23 10:18:38 UTC
snert:/im/rhq/modules/enterprise/agent/target/rhq-agent hrupp$ bin/standalone.sh 
Listening for transport dt_socket at address: 8788

Starting the plugin container.
Loading plugins
Exception in thread "main" java.lang.NullPointerException
	at org.rhq.core.pc.drift.DriftManager.scanForContentToResend(DriftManager.java:239)
	at org.rhq.core.pc.drift.DriftManager.initialize(DriftManager.java:107)
	at org.rhq.core.pc.PluginContainer.startContainerService(PluginContainer.java:431)
	at org.rhq.core.pc.PluginContainer.initialize(PluginContainer.java:291)
	at org.rhq.core.pc.StandaloneContainer.run(StandaloneContainer.java:139)
	at org.rhq.core.pc.StandaloneContainer.main(StandaloneContainer.java:90)


While this may be an issue how the Drift stuff is initialized by the standalone PC, this may also occur in plugin unit tests, where the plugin writer decided to fire a plugin-container for testing.

Comment 1 Heiko W. Rupp 2012-01-23 10:31:06 UTC
changesetDir.listFiles() returns null. Javadoc says:

" Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs."

A patch that works for me is attached.

Comment 2 Heiko W. Rupp 2012-01-23 10:31:56 UTC
Created attachment 556904 [details]
A patch that works for me

Comment 3 Heiko W. Rupp 2012-01-23 11:12:23 UTC
Created attachment 556922 [details]
A patch that works for me

Comment 4 Mike Foley 2012-01-23 16:17:31 UTC
per scrum 1/23/2012 crouch, loleary, mfoley

Comment 5 John Sanda 2012-02-15 20:46:55 UTC
I have applied Heiko's patch in the master branch.

commit hash: 11f486f3c204d021e5e1435c9819ed9a3dfe97ee

Comment 6 Heiko W. Rupp 2013-09-01 19:22:48 UTC
Bulk closing of BZs that have no target version set, but which are ON_QA for more than a year and thus are in production for a long time.


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