Bug 748511 - NPE during bundle deployment
Summary: NPE during bundle deployment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Provisioning
Version: 4.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: rhq42
TreeView+ depends on / blocked
 
Reported: 2011-10-24 16:20 UTC by John Mazzitelli
Modified: 2012-02-07 19:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:19:14 UTC
Embargoed:


Attachments (Terms of Use)

Description John Mazzitelli 2011-10-24 16:20:56 UTC
Tried deploying a bundle and got an NPE. One of the config properties was set to an empty string - I'm wondering if this is now represented as a null???

2011-10-24 12:13:05,431 ERROR [ResourceContainer.invoker.nonDaemon-1] (org.rhq.plugins.ant.AntBundlePluginComponent)- Failed to deploy bundle [class org.rhq.core.pluginapi.bundle.BundleDeployRequest: deployment=[BundleResourceDeployment: bdd=[BundleDeployment[id=10001, name=Deployment [1] of Version [2.0] to [test-destination]]], resource=[Resource[id=10001, type=Linux, key=mazztower, name=mazztower, parent=<null>, version=Linux 2.6.38.6-26.rc1.fc15.x86_64]]], full-deploy-directory=[/tmp/deleteme/example1], clean=[false], revert=[false]]
java.lang.Exception: Failed to execute the bundle Ant script
	at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:157)
	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.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:552)
	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 java.util.Hashtable.put(Hashtable.java:394)
	at java.util.Properties.setProperty(Properties.java:143)
	at org.rhq.plugins.ant.AntBundlePluginComponent.createAntProperties(AntBundlePluginComponent.java:340)
	at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:119)
	... 10 more

Comment 1 John Mazzitelli 2011-10-24 16:53:41 UTC
Change to AntBundlePluginComponent:

-                antProps.setProperty(name, value);
+                if (value != null) {
+                    antProps.setProperty(name, value);
+                }

I will commit this on next push to master.

Comment 2 John Mazzitelli 2011-10-24 16:55:17 UTC
FWIW, to test/replicate this, I used the procedures in Bug #738584 - I think this specifically was caused by setting the jmx-admin-password property to an empty string (which I believe forces a check of "unset") but I don't know for sure if that was the cause.

Comment 3 John Mazzitelli 2011-10-25 13:45:57 UTC
git commit 20c8c79

Comment 4 Mike Foley 2011-10-26 15:22:03 UTC
regression tested basic bundle deploy.

Comment 5 Mike Foley 2012-02-07 19:19:14 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE


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