Bug 783942 - NPE in DriftManager when called from Standalone PC
NPE in DriftManager when called from Standalone PC
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: drift (Show other bugs)
4.3
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: John Sanda
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-23 05:18 EST by Heiko W. Rupp
Modified: 2013-09-01 15:22 EDT (History)
1 user (show)

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


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

  None (edit)
Description Heiko W. Rupp 2012-01-23 05:18:38 EST
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 05:31:06 EST
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 05:31:56 EST
Created attachment 556904 [details]
A patch that works for me
Comment 3 Heiko W. Rupp 2012-01-23 06:12:23 EST
Created attachment 556922 [details]
A patch that works for me
Comment 4 Mike Foley 2012-01-23 11:17:31 EST
per scrum 1/23/2012 crouch, loleary, mfoley
Comment 5 John Sanda 2012-02-15 15:46:55 EST
I have applied Heiko's patch in the master branch.

commit hash: 11f486f3c204d021e5e1435c9819ed9a3dfe97ee
Comment 6 Heiko W. Rupp 2013-09-01 15:22:48 EDT
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.