Bug 1066105 - [eap6] NPE when creating DataSource (Standalone) via CLI
Summary: [eap6] NPE when creating DataSource (Standalone) via CLI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI, Plugins
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: RHQ 4.10
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1067027
TreeView+ depends on / blocked
 
Reported: 2014-02-17 17:21 UTC by Filip Brychta
Modified: 2014-04-23 12:32 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 1067027 (view as bug list)
Environment:
Last Closed: 2014-04-23 12:32:16 UTC
Embargoed:


Attachments (Terms of Use)
cli script (1.39 KB, application/javascript)
2014-02-17 17:21 UTC, Filip Brychta
no flags Details

Description Filip Brychta 2014-02-17 17:21:18 UTC
Created attachment 864204 [details]
cli script

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

Version-Release number of selected component (if applicable):
Version :	
4.10.0-SNAPSHOT
Build Number :	
c526922

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

Comment 1 Jay Shaughnessy 2014-02-18 21:26:33 UTC
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 2 Filip Brychta 2014-02-19 14:42:21 UTC
Verified on 
Version :	
4.10.0-SNAPSHOT
Build Number :	
1e71d84

Comment 3 Heiko W. Rupp 2014-04-23 12:32:16 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.


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