[
https://issues.jboss.org/browse/WFLY-1512?page=com.atlassian.jira.plugin....
]
Thomas Hauser updated WFLY-1512:
--------------------------------
Steps to Reproduce:
To reproduce:
1) Run wildfly in standalone mode.
2) Run jboss-cli.sh, but do not connect.
3) Enter batch mode in jboss-cli.sh
4) Run the following command: data-source add --name=test --connection-url=test
--jndi-name=java:/ --driver-name=h2
Stacktrace here:
http://pastebin.com/9LEVh0u9
was:
To reproduce:
1) Run wildfly in standalone mode.
2) Run jboss-cli.sh
3) Enter batch mode in jboss-cli.sh
4) Run the following command: data-source add --name=test --connection-url=test
--jndi-name=java:/ --driver-name=h2
Stacktrace here:
http://pastebin.com/9LEVh0u9
jboss-cli.sh throws NPE in batch mode with certain commands
-----------------------------------------------------------
Key: WFLY-1512
URL:
https://issues.jboss.org/browse/WFLY-1512
Project: WildFly
Issue Type: Bug
Components: CLI
Affects Versions: 8.0.0.Alpha2
Environment: Linux 3.9.4-200.fc18.x86_64 #1 SMP Fri May 24 20:10:49 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
Reporter: Thomas Hauser
Assignee: Alexey Loubyansky
When the jboss-cli.sh (and by extension, the CommandContext API in java) is given certain
commands while not connected to the client, an unhandled NPE is thrown from
org.jboss.as.cli.handlers.GenericTypeOperationHandler.getOperationDescription(GenericTypeOperationHandler.java:886)
Certain other commands succeed:
[disconnected / #]
/subsystem=datasources/jdbc-driver=ibmdb2:add(driver-name=ibmdb2,driver-module-name=com.ibm.db2)
#1
/subsystem=datasources/jdbc-driver=ibmdb2:add(driver-name=ibmdb2,driver-module-name=com.ibm.db2)
The line in question is here, in org.jboss.as.cli.handlers.GenericTypeOperationHandler:
result = ctx.getModelControllerClient().execute(request);
At the time of this call, the client field of the context is null; therefore, calling the
execute method results in this NPE. This code is not hit with the /subsystem command
because of some logic I see in CommandContextImpl.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira