Details
-
Bug
-
Resolution: Done
-
Major
-
7.0.0.CR1
-
None
-
Workaround Exists
-
Description
The following NPE occurs if a file is executed without specifying to connect: -
java.lang.NullPointerException
at org.jboss.as.cli.handlers.batch.BatchRunHandler.doHandle(BatchRunHandler.java:82)
at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:92)
at org.jboss.as.cli.CommandLineMain.processLine(CommandLineMain.java:437)
at org.jboss.as.cli.CommandLineMain.processFile(CommandLineMain.java:363)
at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:257)
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.jboss.modules.Module.run(Module.java:270)
at org.jboss.modules.Main.main(Main.java:313)
However the error that is reported to the end user is "Failed to execute batch: null"
The following command from the CR1 distro will reproduce: -
./jboss-admin.sh --file=scripts/secure-standalone-mgmt.cli
In addition to this it is not possible to specify the address of the native interface to connect to from the command line when using --file, if --connect is specified only the default host and port will be used.