2
votes

I have a problem in deploying the war file in Jboss7.0.2. when i deployed first time. it worked fine. i made few more changes(added one more end point) and after that i was not able to deploy the war. NO ERROR. but the new service is not getting deployed. But I am able to hit the old services.

steps i followed to deploy it, 1.stop the server 2.Remove the war file from
jboss-as-web-7.0.2/domain/servers/server-one/deployments/ 3. Copy the new war file in to the same location. 4. Start the server.

do i need to do anything other than that? Please help me.

3

3 Answers

5
votes

Instead of deploying by copying and pasting war files back and forth, use the native interface (CLI) or the http interface (admin-console). The deployment works differently in the domain mode.

I love the CLI interface to deploy files quickly. Example of deploying using the CLI in domain mode.

  1. Make sure that jboss is running (domain.sh was executed)
  2. Go to $JBOSS_HOME/bin.
  3. run ./jboss-admin.sh -c (or ./jboss-cli.sh -c if 7.1 or later)
  4. then run the following command in the CLI prompt:

    4.1 To deploy: deploy <war_file> --server-groups=server-one

    -->you should see a success/failure message

    4.2 To undeploy: undeploy <war_file> --server-groups=server-one

    -->you should see a success/failure message

For further reading please see here.

Hope this helps!

0
votes

If you are binding to a specific ip address (or all ips) rather than localhost then

 $ JBOSS_HOME/bin/jboss-cli.sh

The you will see

 [disconnected /]

Type connect

you are no ready to deploy or undeploy

0
votes

I have run into these issues at times and I suspect this is happening in development ONLY as you would put unstable code at times. steps I follow to clear the "bad" deployment
1) clear standalone/tmp

2) clear standalone/data

3) open standalone.xml - go to the end and clear and then restart Jboss. All your old deployments will be cleared.

Also as CoolBeans suggests above you would try to use the Admin console or the CLI.

If you are using Maven why not use Cargo plugin for Jboss and that will do a seamless deployment without you to manually copy to deployments - ofcourse unless you want to deploy in exploded format.