atom feed3 messages in org.codehaus.cargo.userRE: [cargo-user] JBoss Remote Deploym...
FromSent OnAttachments
James FrankmanApr 19, 2007 7:36 am 
James FrankmanApr 19, 2007 9:15 am 
Ouimet, Marie ChristineApr 23, 2007 6:06 am 
Subject:RE: [cargo-user] JBoss Remote Deployment workaround for HTTP 500 error
From:James Frankman (jfra@idfbins.com)
Date:Apr 19, 2007 9:15:52 am
List:org.codehaus.cargo.user

I was able to work around this problem by ftping the file to the JBoss server and then reference the war using the location element in the deployer definition:

<deployer>

<type>remote</type>

<deployables>

<deployable>

<groupId>com.javaworld.hotels</groupId>

<artifactId>HotelWebapp</artifactId>

<type>war</type>

<location>/home/xyzuser/HotelWebapp.war</location>

</deployable>

</deployables>

</deployer>.

The war deploys successfully, but it is only deployed in the tmp/deploy directory. If I go to the /jboss_home/server/default/deploy the war is never put there. So, after I restart JBoss the application deployed by cargo is no longer there. Is this a limitation of JMX or is this a limitation of the cargo api? In other words can the cargo api only deploy remotely to the tmp directory on JBoss, or is there a way that cargo can make the deployment permanent?

________________________________

From: James Frankman [mailto:jfra@idfbins.com] Sent: Thursday, April 19, 2007 8:37 AM To: us@cargo.codehaus.org Subject: [cargo-user] JBoss Remote Deployment workaround for HTTP 500 error

I am trying to find a way to deploy war files remotely to a JBoss server. When I try this I get the following error:

java.io.IOException: Server returned HTTP response code: 500 for URL: http://nexustest:80/jmx-console/HtmlAdaptor?action=invokeOpByName&name=j boss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.UR L&arg0=file:C%3A%5CWork%5CHotelWebapp%5Ctarget%5CHotelWebapp.war <http://nexustest/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jbo ss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL& arg0=file:C%3A%5CWork%5CHotelWebapp%5Ctarget%5CHotelWebapp.war>

I understand that with JBoss the file to be deployed must exist locally on the JBoss server. Is this happening because my war file is on my local development box instead of locally on the JBoss server?

I found this link: http://www.nabble.com/cargo---jboss-remote---Server-returned-HTTP-respon se-code%3A-500-for-URL-tf2263662.html#a6281079 which suggests a workaround by creating a new class, but I would prefer not to do this. Is there any other way deploy a war file to JBoss remotely. For instance, could I FTP the war file to a directory on the JBoss server, place the directory path to the FTP folder inside my pom.xml file and then execute the remote deployment from my development box?

Here is my current pom:

<project xmlns="http://maven.apache.org/POM/4.0.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.javaworld.hotels</groupId>

<artifactId>HotelWebapp</artifactId>

<packaging>war</packaging>

<version>1.0-SNAPSHOT</version>

<name>HotelWebapp Maven Webapp</name>

<url>http://maven.apache.org</url>

<dependencies>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>3.8.1</version>

<scope>test</scope>

</dependency>

</dependencies>

<build>

<finalName>HotelWebapp</finalName>

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<configuration>

<source>1.5</source>

<target>1.5</target>

</configuration>

</plugin>

<plugin>

<groupId>org.codehaus.cargo</groupId>

<artifactId>cargo-maven2-plugin</artifactId>

<version>0.3</version>

<configuration>

<!--remote container config -->

<container>

<containerId>jboss4x</containerId>

<type>remote</type>

</container>

<configuration>

<type>runtime</type>

<properties>

<cargo.hostname>nexustest</cargo.hostname>

<cargo.servlet.port>80</cargo.servlet.port>

</properties>

</configuration>

<deployer>

<type>remote</type>

<deployables>

<deployable>

<groupId>com.javaworld.hotels</groupId>

<artifactId>HotelWebapp</artifactId>

<type>war</type>

</deployable>

</deployables>

</deployer>

</configuration>

</plugin>

</plugins>

</build>

</project>