Bug 818919

Summary: NPE occurs in BaseServerComponent.installManagementUser()
Product: [Other] RHQ Project Reporter: Charles Crouch <ccrouch>
Component: TestsAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.3CC: hbrock, hrupp
Target Milestone: ---   
Target Release: RHQ 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 10:06:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 707223, 818673, 830865    

Description Charles Crouch 2012-05-04 11:01:16 UTC
org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest.arquillianBeforeTest has been failing since build #1465

====== Error occurred during invocation of operation [installRhqUser] with parameters [Configuration[id=0, properties[user=test, password=test], rawConfigurations[]]] on Resource[id=2, uuid=dd6fb6cb-203d-40ca-a0ba-65b817c967a7, type={jboss-as-7}JBossAS7 Host Controller, key=/tmp/jboss-as-6.0.0.ER6/domain, name=EAP Domain Controller (127.0.0.1:59990), parent=pc, version=EAP 6.0.0.ER6]: java.lang.NullPointerException
java.lang.NullPointerException
	at java.io.File.<init>(File.java:305)
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.installManagementUser(BaseServerComponent.java:449)
	at org.rhq.modules.plugins.jbossas7.HostControllerComponent.invokeOperation(HostControllerComponent.java:105)
	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:633)
	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)

Comment 1 Charles Crouch 2012-05-04 11:02:28 UTC
Looks related

(4:59:41 AM) pilhuhn: IpsOne of yur checkins for master build 1465 is bogus
(5:00:14 AM) pilhuhn: ====== Error occurred during invocation of operation [installRhqUser] with parameters [Configuration[id=0, properties[user=test, password=test], rawConfigurations[]]] on Resource[id=2, uuid=e6115be0-80af-4e5c-9be2-203ecc063d11, type={jboss-as-7}JBossAS7 Host Controller, key=/tmp/jboss-as-6.0.0.ER6/domain, name=EAP Domain Controller (127.0.0.1:59990), parent=pc, version=EAP 6.0.0.ER6]: java.lang.NullPointerException
(5:35:53 AM) pilhuhn: probably because in  File baseDir = serverPluginConfig.getBaseDir();   the serverPluginConfig is null as the component is not yet started

Comment 2 Heiko W. Rupp 2012-05-04 12:05:02 UTC
In org.rhq.modules.plugins.jbossas7.BaseServerComponent#installManagementUser

serverPluginConfig is ok, 
but 

this returns null:

            case DOMAIN:
                configFileName = pluginConfig.getSimpleValue("hostConfig");

which makes this NPE:


        File configFile = new File(configDir, configFileName);


This seems to have been introduced by the changes of Bug 817631

Comment 3 Ian Springer 2012-05-04 13:26:38 UTC
This was a regression introduced by the fix for https://bugzilla.redhat.com/show_bug.cgi?id=817631. It's fixed now.

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=830da7e

Comment 5 Heiko W. Rupp 2013-09-01 10:06:53 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.