Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing cargo to deploy war to remote Jboss7 server
    text
    copied!<p>I would like to use <a href="http://cargo.codehaus.org/" rel="nofollow">Cargo</a> to deploy my maven generated <code>war</code> file to a remote JBoss Server that is already running. </p> <p>I have configured my <code>pom.xml</code> like this: </p> <pre><code> ... &lt;plugin&gt; &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt; &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.jboss.as&lt;/groupId&gt; &lt;artifactId&gt;jboss-as-controller-client&lt;/artifactId&gt; &lt;version&gt;7.1.0.Final&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;configuration&gt; &lt;!-- Container configuration --&gt; &lt;container&gt; &lt;timeout&gt;300000&lt;/timeout&gt; &lt;!-- 5 minutes --&gt; &lt;containerId&gt;jboss71x&lt;/containerId&gt; &lt;type&gt;remote&lt;/type&gt; &lt;/container&gt; &lt;!-- Configuration to use with the container --&gt; &lt;configuration&gt; &lt;type&gt;runtime&lt;/type&gt; &lt;properties&gt; &lt;cargo.hostname&gt;&lt;myIP&gt;&lt;/cargo.hostname&gt; &lt;cargo.jboss.management.port&gt;9999&lt;/cargo.jboss.management.port&gt; &lt;cargo.remote.username&gt;&lt;myUser&gt;&lt;/cargo.remote.username&gt; &lt;cargo.remote.password&gt;&lt;myPass&gt;&lt;/cargo.remote.password&gt; &lt;/properties&gt; &lt;/configuration&gt; &lt;!-- Deployer configuration --&gt; &lt;deployer&gt; &lt;type&gt;remote&lt;/type&gt; &lt;/deployer&gt; &lt;!-- Deployables configuration --&gt; &lt;deployables&gt; &lt;deployable&gt; &lt;groupId&gt;de.&lt;myGroup&gt;&lt;/groupId&gt; &lt;artifactId&gt;&lt;myArtifact&gt;&lt;/artifactId&gt; &lt;type&gt;war&lt;/type&gt; &lt;pingURL&gt;http://&lt;myIP&gt;:8080/&lt;myContextPath&gt;&lt;/pingURL&gt; &lt;pingTimeout&gt;60000&lt;/pingTimeout&gt; &lt;/deployable&gt; &lt;/deployables&gt; &lt;/configuration&gt; &lt;/plugin&gt; ... </code></pre> <p>Of course all variables of the form &lt;<code>my...</code>&gt; are filled out with the real values. </p> <p>If I run this with the maven command: </p> <pre><code>mvn -X cargo:deploy </code></pre> <p>The maven console says: </p> <pre><code>... Sep 12, 2012 5:06:12 PM org.xnio.nio.NioXnio &lt;clinit&gt; INFO: XNIO NIO Implementation Version 3.0.3.GA Sep 12, 2012 5:06:12 PM org.jboss.remoting3.EndpointImpl &lt;clinit&gt; INFO: JBoss Remoting version 3.2.2.GA [DEBUG] [swordCallbackHandler] Responded to a RealmCallback [DEBUG] [swordCallbackHandler] Responded to a NameCallback [DEBUG] [swordCallbackHandler] Responded to a PasswordCallback [INFO] [Boss7xRemoteDeployer] The deployment has failed: org.codehaus.cargo.util.CargoException: Cannot deploy deployable org.codehaus.cargo.container.jboss.deployable.JBossWAR[myWar.war] ... </code></pre> <p>On the running JBoss server I can see a logging message in the console like this: </p> <pre><code>17:07:24,197 ERROR [org.jboss.remoting.remote.connection] (Remoting "pc09:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen. </code></pre> <p>(sorry for the german inside of the log. It basically says: An existing connection was closed by the remote host.)</p> <p>Does anybody have an idea what could be wrong or how I could get more debug info from cargo to find out what exactly the problem is?</p> <p>BTW: I have used the JBoss CLI access to that Jboss Server for <a href="http://www.jboss.org/arquillian.html" rel="nofollow">Arquillian</a> tests so I am pretty confident that the access to that Jboss server via CLI should be ok.</p> <p><strong>EDIT:</strong> Seems like I have to undeploy first. To reassure that the access to the CLI works I just connected to it using the <code>jboss-cli.bat</code>. Then I just coincidentally undeployed the existing war and after that the deployment via cargo started to work. (Can I close this question or mark it as resolved in any way?) </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload