Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1067027

Summary: [eap6] NPE when creating DataSource (Standalone) via CLI
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: Plugin -- JBoss EAP 6Assignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.2.1CC: hrupp, jshaughn, loleary, myarboro
Target Milestone: DR01Keywords: Upstream
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1066105 Environment:
Last Closed: 2014-12-11 13:59:52 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: 1066105    
Bug Blocks:    

Description Filip Brychta 2014-02-19 14:25:16 UTC
+++ This bug was initially created as a clone of Bug #1066105 +++

Description of problem:
NPE is thrown when creating a datasouce via attached CLI script.

Version-Release number of selected component (if applicable):
Version :	
JON 3.2.1  DR1

EAP6.2

How reproducible:
Always

Steps to Reproduce:
1. download CLI client and attached CLI script
2. edit CLI script and provide correct datasouces resource ID
2. ./rhq-cli.sh -s <RHQ IP> -p rhqadmin -u rhqadmin -f <path to test.js>
3. go to EAP->datasources->Inventory->Child history and check result of operation

Actual results:
java.lang.NullPointerException
	at org.rhq.modules.plugins.jbossas7.DatasourceComponent.createResource(DatasourceComponent.java:145)
	at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:758)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)


Datasource is visible via EAP CLI.

Expected results:
Datasource is successfully created

Additional info:
Works from UI

--- Additional comment from Jay Shaughnessy on 2014-02-18 16:26:33 EST ---


The test script does not pass any conn or xa props which brought out the issue.


master commit b6a37773c29aa3cd159e3a8701f784233dfd7367
Author: Jay Shaughnessy <jshaughn>
Date:   Tue Feb 18 16:22:38 2014 -0500

    [1066105] [eap6] NPE when creating DataSource (Standalone) via CLI
    Protect against the create resource request not providing any
    non-xa conn props or xa props.

Comment 1 Filip Brychta 2014-02-19 14:29:19 UTC
Note that conn or xa props are NOT required for a nonXA datasource

Comment 2 Jay Shaughnessy 2014-02-19 19:22:34 UTC
Right, I probably should have made that clear.  This is available for cherry-picking.  Waiting on triaged target release.

Comment 3 Larry O'Leary 2014-08-04 16:08:30 UTC
This was not queued up for a plug-in pack update, so I am moving it to 3.3.

Putting on QA for 3.3 DR01 as this work was done by Jay and ready for verification.

Comment 4 Filip Brychta 2014-08-05 09:05:24 UTC
Verified on
Version :	
3.3.0.DR01
Build Number :	
6468454:dda0a47