Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1066108 - [eap6] Confusing error message when empty plugin configuration is passed during creation of new datasource via CLI
Summary: [eap6] Confusing error message when empty plugin configuration is passed duri...
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.10
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: ---
: RHQ 4.13
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-17 17:35 UTC by Filip Brychta
Modified: 2014-07-07 17:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)
cli script (deleted)
2014-02-17 17:35 UTC, Filip Brychta
no flags Details

Description Filip Brychta 2014-02-17 17:35:12 UTC
Created attachment 864207 [details]
cli script

Description of problem:
I accidentally passed empty plugin configuration when creating a datasource via CLI and useless/confusing error message was shown. 

Version-Release number of selected component (if applicable):
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:
Operation <Operation{operation='add', address=Address{path: subsystem=datasources,=testDatasource}, additionalProperties={jndi-name=java:jboss/datasources/testDatasource, driver-name=h2, connection-url=jdbc:h2:mem:testDatasource;DB_CLOSE_DELAY=-1}}> returned unparsable JSON, <"JBAS014701: Invalid resource address element '=testDatasource'. The key '' is not valid for an element in a resource address.">., rolled-back=false

Expected results:
Error should clearly show where is the problem. Nobody would guess that previous message is caused by empty plugin configuration.

Additional info:
Another issue is NPE which is thrown when null is passed instead of plugin configuration. Error saying something like 'plugin configuration required' should be thrown instead of just NPE.

Comment 1 Heiko W. Rupp 2014-05-08 14:42:37 UTC
Bump the target version now that 4.11 is out.


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