Bug 818919 - NPE occurs in BaseServerComponent.installManagementUser()
Summary: NPE occurs in BaseServerComponent.installManagementUser()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Tests
Version: 4.3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: RHQ 4.4.0
Assignee: Charles Crouch
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: as7-plugin 818673 830865
TreeView+ depends on / blocked
 
Reported: 2012-05-04 11:01 UTC by Charles Crouch
Modified: 2015-02-01 23:28 UTC (History)
2 users (show)

Fixed In Version: 4.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-01 10:06:53 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 817631 0 high ON_QA [as7] Honor the "Configuration" plugin config property when starting or restarting the server 2024-03-04 13:35:02 UTC

Internal Links: 817631

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.


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