And while my script is deploying the war it is not able to deploy the war file and throwing the following exception and the same script is working good while using in some other machine I there any environment variables issue can any one help regarding this .

thanks in advance...

org.jboss.as.cli.CliInitializationException: Failed to connect to the controller

at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java

:229)

at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:195)

at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.modules.Module.run(Module.java:260)

at org.jboss.modules.Main.main(Main.java:291)

Caused by: org.jboss.as.cli.CommandLineException: The controller is not availabl

e at localhost:9999

at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandCon

textImpl.java:639)

at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandCon

textImpl.java:613)

at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java

I found that this is a bugs in JBoss AS7. It fixed with wildfly -8 Version. So Don't try this for shut down. JBoss with Management CLI. You can sipmly shut down JBoss AS using of management Console or Press CTRL + C.

For war deployment issue. Just copy your war file into deploy folder and restart your JBoss AS. Lot of method is available to deploy war into JBoss. If you are using Management CLI. You have follow some steps. For Management console is also simple one process to deploy war into JBoss As.