Hi,
I'm using JBoss 7.1.3. I would like to deploy a WAR file via a script. So I created my "test.cli" script containing only
deploy /tmp/my.war
However, when I run the following, I get the error you see ...
[dalvarado@mydomain ~]$ $JBOSS_HOME/bin/jboss-cli.sh --file=test.cli
The command is not available in the current context (e.g. required subsystems or connection to the controller might be unavailable).
INterestingly, if my "test.cli" file contains only the word "version", I get this
[dalvarado@mydomain ~]$ $JBOSS_HOME/bin/jboss-cli.sh --file=test.cli
JBoss Admin Command-line Interface
JBOSS_HOME: /usr/java/jboss
JBoss AS release: <connect to the controller and re-run the version command to see the release info>
JAVA_HOME: /usr/lib/jvm/jre
java.version: 1.6.0_30
java.vm.vendor: Sun Microsystems Inc.
What can I do need to do to enable WAR deployment?
java.vm.version: 23.25-b01
os.name: Linux
os.version: 3.4.76-65.111.amzn1.x86_64
you need to be connected to server...
you should add -c to your command [dalvarado@mydomain ~]$ $JBOSS_HOME/bin/jboss-cli.sh --file=test.cli -c
Or have first command in CLI call "connect"