aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Problems deploying to remote Tomcat with CARGO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problems deploying to remote Tomcat with CARGO" Watch "Problems deploying to remote Tomcat with CARGO" New topic
Author

Problems deploying to remote Tomcat with CARGO

Sven Anderson
Ranch Hand

Joined: Apr 14, 2004
Posts: 58
Hi,

I'm not sure if this is a networking/tomcat problem or a configuration problem with CARGO and my maven2 pom file.

When I try to deploy to a remote Tomcat instance (currently running) I get an IOException stating

Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.che
ckError(HttpURLConnection.java:2524)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.wri
te(HttpURLConnection.java:2507)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(Tomca
tManager.java:601)


The war file I'm deploying is about 17MB. Deploying using the Tomcat manager is working fine. Can someone point me in the right direction whether it's a problems with the CARGO config or if the problem might be somewhere else. I'm using maven 2.09, JDK-1.6.0_06 and Tomcat 5.5

<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<!-- <version>1.0-alpha-6</version> -->

<configuration>
<container>
<containerId>tomcat5x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.tomcat.manager.url>
http://server1:8080/manager
</cargo.tomcat.manager.url>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>admin</cargo.remote.password>
</properties>
</configuration>

<deployer>
<type>remote</type>
<deployables>
<deployable>
<groupId>net.xzy</groupId>
<artifactId>myapp</artifactId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
Sven Anderson
Ranch Hand

Joined: Apr 14, 2004
Posts: 58
Hi,

Just to let you know that I managed to do a mvn cargo eploy from a different machine. This machine is running maven 2.0.8, jdk1.5.0_13 and this computer sits on the same subnet as the tomcat server. It would be interesting to know if other people have experienced similar problems and how you solved them. According to our sys admins we don't have any firewalls etc between these machines so networking shouldn't be an issue.
Gisbert Amm
Greenhorn

Joined: Oct 15, 2007
Posts: 2
I had a proxy configured on one machine that prevented Cargo from redeploying. Strangely enough, undeploying was successful. After that, I got the IOException described above. Turning off the proxy did solve the problem for both, Maven 2.09 and Maven 2.20 with Java 1.6.0_15 on Mac OS X 10.5.8.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems deploying to remote Tomcat with CARGO