Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Jean-Louis Matéo
Hi everybody,

 

 

Environment :

Windows 7

Java 1.8.45,

Cargo 1.4.13

Tomcat 8.0.21

Eclipse Luna

 

when I try to deploy my test war file, through Eclipse, I get the following message :

 

 

[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building SessionTest Maven Webapp 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SessionTest ---

[INFO] Deleting C:\Users\MATEO-JL\workspace\SessionTest\target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SessionTest ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[INFO] Compiling 4 source files to C:\Users\MATEO-JL\workspace\SessionTest\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\MATEO-JL\workspace\SessionTest\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SessionTest ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SessionTest ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ SessionTest ---

[INFO] Packaging webapp

[INFO] Assembling webapp [SessionTest] in [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest]

[INFO] Processing war project

[INFO] Copying webapp resources [C:\Users\MATEO-JL\workspace\SessionTest\src\main\webapp]

[INFO] Webapp assembled in [593 msecs]

[INFO] Building war: C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war

[INFO] WEB-INF\web.xml already added, skipping

[INFO]

[INFO] --- maven-install-plugin:2.4:install (default-install) @ SessionTest ---

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.war

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\pom.xml to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.pom

[INFO]

[INFO] --- cargo-maven2-plugin:1.4.13:deploy (default-cli) @ SessionTest ---

[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.13 for container tomcat8x

[INFO] [mcat8xRemoteDeployer] Deploying [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.838 s

[INFO] Finished at: 2015-04-16T16:01:36+02:00

[INFO] Final Memory: 17M/331M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]: Error writing request body to server -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

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

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

       ... 19 more

Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)

       at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)

       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:435)

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

       ... 20 more

Caused by: java.io.IOException: Error writing request body to server

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)

       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:805)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:561)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:745)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:309)

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:102)

       ... 25 more

[ERROR]

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

 

Here is my pom.xml:

 

<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.mat</groupId>

  <artifactId>SessionTest</artifactId>

  <packaging>war</packaging>

  <version>0.0.1-SNAPSHOT</version>

  <name>SessionTest Maven Webapp</name>

  <url>http://maven.apache.org%3c/url>

 

       <properties>

             <mvn.ver>3.3</mvn.ver>

             <jstl.ver>1.2</jstl.ver>

             <taglibs.ver>1.1.2</taglibs.ver>

             <servlet.ver>3.1.0</servlet.ver>

       </properties>

 

 

  <dependencies> 

       <dependency>

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

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

             <version>${mvn.ver}</version>

       </dependency>

 

       <dependency>

             <groupId>javax.servlet</groupId>

             <artifactId>javax.servlet-api</artifactId>

             <version>${servlet.ver}</version>

       </dependency>

      

       <dependency>

             <groupId>jstl</groupId>

             <artifactId>jstl</artifactId>

             <version>${jstl.ver}</version>

             <scope>compile</scope>

       </dependency>

 

       <dependency>

             <groupId>taglibs</groupId>

             <artifactId>standard</artifactId>

             <version>${taglibs.ver}</version>

       </dependency>

  </dependencies>

 

  <build>

       <plugins>

              <plugin>

             

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

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

            <version>1.4.13</version >

                    <configuration>

 

                           <container>

                                  <containerId>tomcat8x</containerId>

                                  <type>remote</type>

                           </container>

                                 

                           <configuration>

                                  <type>runtime</type>

                                        <properties>

                                               <cargo.hostname>127.0.0.1</cargo.hostname>

                                               <cargo.protocol>http</cargo.protocol>

                                               <cargo.servlet.port>8080</cargo.servlet.port>

                                               <cargo.remote.username>tomcat</cargo.remote.username>

                                               <cargo.remote.password>tomcat</cargo.remote.password>

                                        </properties>

                                  </configuration>

                           </configuration>

              </plugin>

       </plugins>

      

    <finalName>SessionTest</finalName>

 

  </build>

</project>

 

Any ideas on where should I look at ?

 

 

Best Regards

blue_strip

 

Jean-Louis Matéo

Support LiberTP – Atos France

Office : +33 (0)4 72 52 51 78

Mobile : +33 (0)6 87 72 71 43

[hidden email]

 

53, rue de l’Etang BP39

69578 Limonest cedex

 

www.atos.net­­­­­­­­­­­­­

blue_strip

cid:image004.jpg@01D0149B.0E1B9740

 

This e-mail contains material that is confidential for the sole use of the intended recipient.

Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited.

If you are not the intended recipient, please contact the sender and delete all copies.

graphicThink environment 

          Print only if necessary

Reply | Threaded
Open this post in threaded view
|

RE: Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

S. Ali Tokmen
Hi Jean Louis

Are you sure you carefully followed the instructions on http://cargo.codehaus.org/Jetty+Remote+Deployer for configuring your Jetty server?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

From: [hidden email]
Sent: ‎16/‎04/‎2015 19:06
To: [hidden email]
Subject: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Hi everybody,

 

 

Environment :

Windows 7

Java 1.8.45,

Cargo 1.4.13

Tomcat 8.0.21

Eclipse Luna

 

when I try to deploy my test war file, through Eclipse, I get the following message :

 

 

[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building SessionTest Maven Webapp 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SessionTest ---

[INFO] Deleting C:\Users\MATEO-JL\workspace\SessionTest\target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SessionTest ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[INFO] Compiling 4 source files to C:\Users\MATEO-JL\workspace\SessionTest\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\MATEO-JL\workspace\SessionTest\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SessionTest ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SessionTest ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ SessionTest ---

[INFO] Packaging webapp

[INFO] Assembling webapp [SessionTest] in [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest]

[INFO] Processing war project

[INFO] Copying webapp resources [C:\Users\MATEO-JL\workspace\SessionTest\src\main\webapp]

[INFO] Webapp assembled in [593 msecs]

[INFO] Building war: C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war

[INFO] WEB-INF\web.xml already added, skipping

[INFO]

[INFO] --- maven-install-plugin:2.4:install (default-install) @ SessionTest ---

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.war

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\pom.xml to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.pom

[INFO]

[INFO] --- cargo-maven2-plugin:1.4.13:deploy (default-cli) @ SessionTest ---

[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.13 for container tomcat8x

[INFO] [mcat8xRemoteDeployer] Deploying [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.838 s

[INFO] Finished at: 2015-04-16T16:01:36+02:00

[INFO] Final Memory: 17M/331M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]: Error writing request body to server -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

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

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

       ... 19 more

Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)

       at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)

       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:435)

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

       ... 20 more

Caused by: java.io.IOException: Error writing request body to server

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)

       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:805)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:561)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:745)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:309)

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:102)

       ... 25 more

[ERROR]

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

 

Here is my pom.xml:

 

<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.mat</groupId>

  <artifactId>SessionTest</artifactId>

  <packaging>war</packaging>

  <version>0.0.1-SNAPSHOT</version>

  <name>SessionTest Maven Webapp</name>

  <url>http://maven.apache.org%3c/url>

 

       <properties>

             <mvn.ver>3.3</mvn.ver>

             <jstl.ver>1.2</jstl.ver>

             <taglibs.ver>1.1.2</taglibs.ver>

             <servlet.ver>3.1.0</servlet.ver>

       </properties>

 

 

  <dependencies> 

       <dependency>

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

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

             <version>${mvn.ver}</version>

       </dependency>

 

       <dependency>

             <groupId>javax.servlet</groupId>

             <artifactId>javax.servlet-api</artifactId>

             <version>${servlet.ver}</version>

       </dependency>

      

       <dependency>

             <groupId>jstl</groupId>

             <artifactId>jstl</artifactId>

             <version>${jstl.ver}</version>

             <scope>compile</scope>

       </dependency>

 

       <dependency>

             <groupId>taglibs</groupId>

             <artifactId>standard</artifactId>

             <version>${taglibs.ver}</version>

       </dependency>

  </dependencies>

 

  <build>

       <plugins>

              <plugin>

             

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

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

            <version>1.4.13</version >

                    <configuration>

 

                           <container>

                                  <containerId>tomcat8x</containerId>

                                  <type>remote</type>

                           </container>

                                 

                           <configuration>

                                  <type>runtime</type>

                                        <properties>

                                               <cargo.hostname>127.0.0.1</cargo.hostname>

                                               <cargo.protocol>http</cargo.protocol>

                                               <cargo.servlet.port>8080</cargo.servlet.port>

                                               <cargo.remote.username>tomcat</cargo.remote.username>

                                               <cargo.remote.password>tomcat</cargo.remote.password>

                                        </properties>

                                  </configuration>

                           </configuration>

              </plugin>

       </plugins>

      

    <finalName>SessionTest</finalName>

 

  </build>

</project>

 

Any ideas on where should I look at ?

 

 

Best Regards

blue_strip

 

Jean-Louis Matéo

Support LiberTP – Atos France

Office : +33 (0)4 72 52 51 78

Mobile : +33 (0)6 87 72 71 43

[hidden email]

 

53, rue de l’Etang BP39

69578 Limonest cedex

 

www.atos.net­­­­­­­­­­­­­

blue_strip

cid:image004.jpg@01D0149B.0E1B9740

 

This e-mail contains material that is confidential for the sole use of the intended recipient.

Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited.

If you are not the intended recipient, please contact the sender and delete all copies.

graphicThink environment 

          Print only if necessary



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Jean-Louis Matéo
Hi Ali,
 
I try to deploy wars on a tomcat server so I’ve read the informations at this url: http://cargo.codehaus.org/Tomcat+8.x
 
Are you meaning that deployments are only possible with a jetty server ?
 
Regards
Jean-Louis Matéo
 
Sent: Thursday, April 16, 2015 7:39 PM
Subject: RE: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server
 
Hi Jean Louis

Are you sure you carefully followed the instructions on http://cargo.codehaus.org/Jetty+Remote+Deployer for configuring your Jetty server?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

From: [hidden email]
Sent: ‎16/‎04/‎2015 19:06
To: [hidden email]
Subject: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Hi everybody,

 

 

Environment :

Windows 7

Java 1.8.45,

Cargo 1.4.13

Tomcat 8.0.21

Eclipse Luna

 

when I try to deploy my test war file, through Eclipse, I get the following message :

 

 

[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building SessionTest Maven Webapp 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SessionTest ---

[INFO] Deleting C:\Users\MATEO-JL\workspace\SessionTest\target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SessionTest ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[INFO] Compiling 4 source files to C:\Users\MATEO-JL\workspace\SessionTest\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\MATEO-JL\workspace\SessionTest\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SessionTest ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SessionTest ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ SessionTest ---

[INFO] Packaging webapp

[INFO] Assembling webapp [SessionTest] in [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest]

[INFO] Processing war project

[INFO] Copying webapp resources [C:\Users\MATEO-JL\workspace\SessionTest\src\main\webapp]

[INFO] Webapp assembled in [593 msecs]

[INFO] Building war: C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war

[INFO] WEB-INF\web.xml already added, skipping

[INFO]

[INFO] --- maven-install-plugin:2.4:install (default-install) @ SessionTest ---

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.war

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\pom.xml to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.pom

[INFO]

[INFO] --- cargo-maven2-plugin:1.4.13:deploy (default-cli) @ SessionTest ---

[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.13 for container tomcat8x

[INFO] [mcat8xRemoteDeployer] Deploying [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.838 s

[INFO] Finished at: 2015-04-16T16:01:36+02:00

[INFO] Final Memory: 17M/331M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]: Error writing request body to server -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

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

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

       ... 19 more

Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)

       at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)

       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:435)

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

       ... 20 more

Caused by: java.io.IOException: Error writing request body to server

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)

       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:805)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:561)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:745)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:309)

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:102)

       ... 25 more

[ERROR]

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

 

Here is my pom.xml:

 

<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.mat</groupId>

  <artifactId>SessionTest</artifactId>

  <packaging>war</packaging>

  <version>0.0.1-SNAPSHOT</version>

  <name>SessionTest Maven Webapp</name>

  <url>http://maven.apache.org%3c/url>

 

       <properties>

             <mvn.ver>3.3</mvn.ver>

             <jstl.ver>1.2</jstl.ver>

             <taglibs.ver>1.1.2</taglibs.ver>

             <servlet.ver>3.1.0</servlet.ver>

       </properties>

 

 

  <dependencies> 

       <dependency>

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

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

             <version>${mvn.ver}</version>

       </dependency>

 

       <dependency>

             <groupId>javax.servlet</groupId>

             <artifactId>javax.servlet-api</artifactId>

             <version>${servlet.ver}</version>

       </dependency>

      

       <dependency>

             <groupId>jstl</groupId>

             <artifactId>jstl</artifactId>

             <version>${jstl.ver}</version>

             <scope>compile</scope>

       </dependency>

 

       <dependency>

             <groupId>taglibs</groupId>

             <artifactId>standard</artifactId>

             <version>${taglibs.ver}</version>

       </dependency>

  </dependencies>

 

  <build>

       <plugins>

              <plugin>

             

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

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

            <version>1.4.13</version >

                    <configuration>

 

                           <container>

                                  <containerId>tomcat8x</containerId>

                                  <type>remote</type>

                           </container>

                                 

                           <configuration>

                                  <type>runtime</type>

                                        <properties>

                                               <cargo.hostname>127.0.0.1</cargo.hostname>

                                               <cargo.protocol>http</cargo.protocol>

                                               <cargo.servlet.port>8080</cargo.servlet.port>

                                               <cargo.remote.username>tomcat</cargo.remote.username>

                                               <cargo.remote.password>tomcat</cargo.remote.password>

                                        </properties>

                                  </configuration>

                           </configuration>

              </plugin>

       </plugins>

      

    <finalName>SessionTest</finalName>

 

  </build>

</project>

 

Any ideas on where should I look at ?

 

 

Best Regards

blue_strip

 

Jean-Louis Matéo

Support LiberTP – Atos France

Office : +33 (0)4 72 52 51 78

Mobile : +33 (0)6 87 72 71 43

[hidden email]

 

53, rue de l’Etang BP39

69578 Limonest cedex

 

www.atos.net­­­­­­­­­­­­­

blue_strip

cid:image004.jpg@01D0149B.0E1B9740

 

This e-mail contains material that is confidential for the sole use of the intended recipient.

Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited.

If you are not the intended recipient, please contact the sender and delete all copies.

graphicThink environment 

          Print only if necessary



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

S. Ali Tokmen
Hi Jean Louis

Sorry, I've read too fast.

With Tomcat 8, the Tomcat manager has multiple aspects to be careful about:
  • Your browser by default accesses the HTML-based manager whereas CARGO needs to use the text-based manager. As a result, if you want to set the RemotePropertySet.URI manually, please make sure you set the URL for the text-based manager, for example http://production27:8080/manager/text
  • The text-based manager requires to be accessed by a user with the manager-script role; and by default no user has that role. As a result, please make sure you modify your tomcat-users.xml file to give that role to a user.
    You can read more in the Tomcat documentation: http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html
Did you check these?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 17/04/15 19:37, Jean-Louis Matéo wrote:
Hi Ali,
 
I try to deploy wars on a tomcat server so I’ve read the informations at this url: http://cargo.codehaus.org/Tomcat+8.x
 
Are you meaning that deployments are only possible with a jetty server ?
 
Regards
Jean-Louis Matéo
 
Sent: Thursday, April 16, 2015 7:39 PM
Subject: RE: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server
 
Hi Jean Louis

Are you sure you carefully followed the instructions on http://cargo.codehaus.org/Jetty+Remote+Deployer for configuring your Jetty server?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

From: [hidden email]
Sent: ‎16/‎04/‎2015 19:06
To: [hidden email]
Subject: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Hi everybody,

 

 

Environment :

Windows 7

Java 1.8.45,

Cargo 1.4.13

Tomcat 8.0.21

Eclipse Luna

 

when I try to deploy my test war file, through Eclipse, I get the following message :

 

 

[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building SessionTest Maven Webapp 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SessionTest ---

[INFO] Deleting C:\Users\MATEO-JL\workspace\SessionTest\target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SessionTest ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[INFO] Compiling 4 source files to C:\Users\MATEO-JL\workspace\SessionTest\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\MATEO-JL\workspace\SessionTest\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SessionTest ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SessionTest ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ SessionTest ---

[INFO] Packaging webapp

[INFO] Assembling webapp [SessionTest] in [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest]

[INFO] Processing war project

[INFO] Copying webapp resources [C:\Users\MATEO-JL\workspace\SessionTest\src\main\webapp]

[INFO] Webapp assembled in [593 msecs]

[INFO] Building war: C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war

[INFO] WEB-INF\web.xml already added, skipping

[INFO]

[INFO] --- maven-install-plugin:2.4:install (default-install) @ SessionTest ---

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.war

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\pom.xml to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.pom

[INFO]

[INFO] --- cargo-maven2-plugin:1.4.13:deploy (default-cli) @ SessionTest ---

[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.13 for container tomcat8x

[INFO] [mcat8xRemoteDeployer] Deploying [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.838 s

[INFO] Finished at: 2015-04-16T16:01:36+02:00

[INFO] Final Memory: 17M/331M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]: Error writing request body to server -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

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

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

       ... 19 more

Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)

       at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)

       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:435)

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

       ... 20 more

Caused by: java.io.IOException: Error writing request body to server

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)

       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:805)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:561)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:745)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:309)

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:102)

       ... 25 more

[ERROR]

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

 

Here is my pom.xml:

 

<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.mat</groupId>

  <artifactId>SessionTest</artifactId>

  <packaging>war</packaging>

  <version>0.0.1-SNAPSHOT</version>

  <name>SessionTest Maven Webapp</name>

  <url>http://maven.apache.org%3c/url>

 

       <properties>

             <mvn.ver>3.3</mvn.ver>

             <jstl.ver>1.2</jstl.ver>

             <taglibs.ver>1.1.2</taglibs.ver>

             <servlet.ver>3.1.0</servlet.ver>

       </properties>

 

 

  <dependencies> 

       <dependency>

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

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

             <version>${mvn.ver}</version>

       </dependency>

 

       <dependency>

             <groupId>javax.servlet</groupId>

             <artifactId>javax.servlet-api</artifactId>

             <version>${servlet.ver}</version>

       </dependency>

      

       <dependency>

             <groupId>jstl</groupId>

             <artifactId>jstl</artifactId>

             <version>${jstl.ver}</version>

             <scope>compile</scope>

       </dependency>

 

       <dependency>

             <groupId>taglibs</groupId>

             <artifactId>standard</artifactId>

             <version>${taglibs.ver}</version>

       </dependency>

  </dependencies>

 

  <build>

       <plugins>

              <plugin>

             

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

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

            <version>1.4.13</version >

                    <configuration>

 

                           <container>

                                  <containerId>tomcat8x</containerId>

                                  <type>remote</type>

                           </container>

                                 

                           <configuration>

                                  <type>runtime</type>

                                        <properties>

                                               <cargo.hostname>127.0.0.1</cargo.hostname>

                                               <cargo.protocol>http</cargo.protocol>

                                               <cargo.servlet.port>8080</cargo.servlet.port>

                                               <cargo.remote.username>tomcat</cargo.remote.username>

                                               <cargo.remote.password>tomcat</cargo.remote.password>

                                        </properties>

                                  </configuration>

                           </configuration>

              </plugin>

       </plugins>

      

    <finalName>SessionTest</finalName>

 

  </build>

</project>

 

Any ideas on where should I look at ?

 

 

Best Regards

blue_strip

 

Jean-Louis Matéo

Support LiberTP – Atos France

Office : +33 (0)4 72 52 51 78

Mobile : +33 (0)6 87 72 71 43

[hidden email]

 

53, rue de l’Etang BP39

69578 Limonest cedex

 

www.atos.net­­­­­­­­­­­­­

blue_strip

cid:image004.jpg@01D0149B.0E1B9740

 

This e-mail contains material that is confidential for the sole use of the intended recipient.

Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited.

If you are not the intended recipient, please contact the sender and delete all copies.

graphicThink environment 

          Print only if necessary



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Jean-Louis Matéo
Hi Ali,
 
finally I used the tomcat7-maven-plugin instead.
You’re right: after having set the url for the text-based manager and added the manager-script role for the given user in tomcat-users.xml, it worked fine.
 
I haven’t tried with the cargo-maven2-plugin but I’m sure it will work the same way.
 
Many thanks for your valuable answer
 
Regards
Jean-Louis Matéo
 
Sent: Sunday, April 19, 2015 5:00 PM
Subject: Re: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server
 
Hi Jean Louis

Sorry, I've read too fast.

With Tomcat 8, the Tomcat manager has multiple aspects to be careful about:
  • Your browser by default accesses the HTML-based manager whereas CARGO needs to use the text-based manager. As a result, if you want to set the RemotePropertySet.URI manually, please make sure you set the URL for the text-based manager, for example http://production27:8080/manager/text
  • The text-based manager requires to be accessed by a user with the manager-script role; and by default no user has that role. As a result, please make sure you modify your tomcat-users.xml file to give that role to a user.
    You can read more in the Tomcat documentation: http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html
Did you check these?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 17/04/15 19:37, Jean-Louis Matéo wrote:
Hi Ali,
 
I try to deploy wars on a tomcat server so I’ve read the informations at this url: http://cargo.codehaus.org/Tomcat+8.x
 
Are you meaning that deployments are only possible with a jetty server ?
 
Regards
Jean-Louis Matéo
 
Sent: Thursday, April 16, 2015 7:39 PM
Subject: RE: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server
 
Hi Jean Louis

Are you sure you carefully followed the instructions on http://cargo.codehaus.org/Jetty+Remote+Deployer for configuring your Jetty server?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

From: [hidden email]
Sent: ‎16/‎04/‎2015 19:06
To: [hidden email]
Subject: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Hi everybody,

 

 

Environment :

Windows 7

Java 1.8.45,

Cargo 1.4.13

Tomcat 8.0.21

Eclipse Luna

 

when I try to deploy my test war file, through Eclipse, I get the following message :

 

 

[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building SessionTest Maven Webapp 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SessionTest ---

[INFO] Deleting C:\Users\MATEO-JL\workspace\SessionTest\target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SessionTest ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[INFO] Compiling 4 source files to C:\Users\MATEO-JL\workspace\SessionTest\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\MATEO-JL\workspace\SessionTest\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SessionTest ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SessionTest ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ SessionTest ---

[INFO] Packaging webapp

[INFO] Assembling webapp [SessionTest] in [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest]

[INFO] Processing war project

[INFO] Copying webapp resources [C:\Users\MATEO-JL\workspace\SessionTest\src\main\webapp]

[INFO] Webapp assembled in [593 msecs]

[INFO] Building war: C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war

[INFO] WEB-INF\web.xml already added, skipping

[INFO]

[INFO] --- maven-install-plugin:2.4:install (default-install) @ SessionTest ---

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.war

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\pom.xml to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.pom

[INFO]

[INFO] --- cargo-maven2-plugin:1.4.13:deploy (default-cli) @ SessionTest ---

[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.13 for container tomcat8x

[INFO] [mcat8xRemoteDeployer] Deploying [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.838 s

[INFO] Finished at: 2015-04-16T16:01:36+02:00

[INFO] Final Memory: 17M/331M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]: Error writing request body to server -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

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

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

       ... 19 more

Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)

       at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)

       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:435)

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

       ... 20 more

Caused by: java.io.IOException: Error writing request body to server

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)

       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:805)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:561)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:745)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:309)

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:102)

       ... 25 more

[ERROR]

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

 

Here is my pom.xml:

 

<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.mat</groupId>

  <artifactId>SessionTest</artifactId>

  <packaging>war</packaging>

  <version>0.0.1-SNAPSHOT</version>

  <name>SessionTest Maven Webapp</name>

  <url>http://maven.apache.org%3c/url>

 

       <properties>

             <mvn.ver>3.3</mvn.ver>

             <jstl.ver>1.2</jstl.ver>

             <taglibs.ver>1.1.2</taglibs.ver>

             <servlet.ver>3.1.0</servlet.ver>

       </properties>

 

 

  <dependencies> 

       <dependency>

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

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

             <version>${mvn.ver}</version>

       </dependency>

 

       <dependency>

             <groupId>javax.servlet</groupId>

             <artifactId>javax.servlet-api</artifactId>

             <version>${servlet.ver}</version>

       </dependency>

      

       <dependency>

             <groupId>jstl</groupId>

             <artifactId>jstl</artifactId>

             <version>${jstl.ver}</version>

             <scope>compile</scope>

       </dependency>

 

       <dependency>

             <groupId>taglibs</groupId>

             <artifactId>standard</artifactId>

             <version>${taglibs.ver}</version>

       </dependency>

  </dependencies>

 

  <build>

       <plugins>

              <plugin>

             

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

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

            <version>1.4.13</version >

                    <configuration>

 

                           <container>

                                  <containerId>tomcat8x</containerId>

                                  <type>remote</type>

                           </container>

                                 

                           <configuration>

                                  <type>runtime</type>

                                        <properties>

                                               <cargo.hostname>127.0.0.1</cargo.hostname>

                                               <cargo.protocol>http</cargo.protocol>

                                               <cargo.servlet.port>8080</cargo.servlet.port>

                                               <cargo.remote.username>tomcat</cargo.remote.username>

                                               <cargo.remote.password>tomcat</cargo.remote.password>

                                        </properties>

                                  </configuration>

                           </configuration>

              </plugin>

       </plugins>

      

    <finalName>SessionTest</finalName>

 

  </build>

</project>

 

Any ideas on where should I look at ?

 

 

Best Regards

<IMG id=Image_x0020_1 border=0 alt=blue_strip src="wlmailhtml:{06D5E301-994B-4081-A0FB-C80E2240845F}mid://00000024/!cid:part13.07040708.08040705@alishomepage.com" width=128 height=3>

 

Jean-Louis Matéo

Support LiberTP – Atos France

Office : +33 (0)4 72 52 51 78

Mobile : +33 (0)6 87 72 71 43

[hidden email]

 

53, rue de l’Etang BP39

69578 Limonest cedex

 

www.atos.net­­­­­­­­­­­­­

<IMG id=Image_x0020_2 border=0 alt=blue_strip src="wlmailhtml:{06D5E301-994B-4081-A0FB-C80E2240845F}mid://00000024/!cid:part13.07040708.08040705@alishomepage.com" width=128 height=3>

<IMG id=Image_x0020_3 border=0 alt=cid:image004.jpg@01D0149B.0E1B9740 src="wlmailhtml:{06D5E301-994B-4081-A0FB-C80E2240845F}mid://00000024/!cid:part17.09060609.02050507@alishomepage.com" width=78 height=34>

 

This e-mail contains material that is confidential for the sole use of the intended recipient.

Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited.

If you are not the intended recipient, please contact the sender and delete all copies.

<IMG id=Image_x0020_4 border=0 alt=graphic src="wlmailhtml:{06D5E301-994B-4081-A0FB-C80E2240845F}mid://00000024/!cid:part18.09040507.09080404@alishomepage.com" width=27 height=27>Think environment 

          Print only if necessary



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


0A4D0E8D9ACB4998AFFDD3C1084ABDD3@HPDV66192SF (108 bytes) Download Attachment
C213B6E6EA514DF0864673F40D61EBAF@HPDV66192SF (108 bytes) Download Attachment
54951E161CA14CA5AE3B816DA7F49BC3@HPDV66192SF (2K) Download Attachment
5CC1161F22CF40E7B57597F4570A7F4B@HPDV66192SF (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

S. Ali Tokmen
Hi Jean Louis

Indeed, this would work the same as well.

Note that we documented this on https://codehaus-cargo.github.io/cargo/Tomcat+7.x.html as well as https://codehaus-cargo.github.io/cargo/Tomcat+8.x.html (scroll down to the end of the page).

Hope this helps

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 19/04/15 18:45, Jean-Louis Matéo wrote:
Hi Ali,
 
finally I used the tomcat7-maven-plugin instead.
You’re right: after having set the url for the text-based manager and added the manager-script role for the given user in tomcat-users.xml, it worked fine.
 
I haven’t tried with the cargo-maven2-plugin but I’m sure it will work the same way.
 
Many thanks for your valuable answer
 
Regards
Jean-Louis Matéo
 
Sent: Sunday, April 19, 2015 5:00 PM
Subject: Re: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server
 
Hi Jean Louis

Sorry, I've read too fast.

With Tomcat 8, the Tomcat manager has multiple aspects to be careful about:
  • Your browser by default accesses the HTML-based manager whereas CARGO needs to use the text-based manager. As a result, if you want to set the RemotePropertySet.URI manually, please make sure you set the URL for the text-based manager, for example http://production27:8080/manager/text
  • The text-based manager requires to be accessed by a user with the manager-script role; and by default no user has that role. As a result, please make sure you modify your tomcat-users.xml file to give that role to a user.
    You can read more in the Tomcat documentation: http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html
Did you check these?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 17/04/15 19:37, Jean-Louis Matéo wrote:
Hi Ali,
 
I try to deploy wars on a tomcat server so I’ve read the informations at this url: http://cargo.codehaus.org/Tomcat+8.x
 
Are you meaning that deployments are only possible with a jetty server ?
 
Regards
Jean-Louis Matéo
 
Sent: Thursday, April 16, 2015 7:39 PM
Subject: RE: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server
 
Hi Jean Louis

Are you sure you carefully followed the instructions on http://cargo.codehaus.org/Jetty+Remote+Deployer for configuring your Jetty server?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

From: [hidden email]
Sent: ‎16/‎04/‎2015 19:06
To: [hidden email]
Subject: [cargo-user] Cargo 1.4.13 - Deploying a war in Tomcat 8 container - Error writing request body to server

Hi everybody,

 

 

Environment :

Windows 7

Java 1.8.45,

Cargo 1.4.13

Tomcat 8.0.21

Eclipse Luna

 

when I try to deploy my test war file, through Eclipse, I get the following message :

 

 

[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building SessionTest Maven Webapp 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SessionTest ---

[INFO] Deleting C:\Users\MATEO-JL\workspace\SessionTest\target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SessionTest ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[INFO] Compiling 4 source files to C:\Users\MATEO-JL\workspace\SessionTest\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SessionTest ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\MATEO-JL\workspace\SessionTest\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SessionTest ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SessionTest ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.2:war (default-war) @ SessionTest ---

[INFO] Packaging webapp

[INFO] Assembling webapp [SessionTest] in [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest]

[INFO] Processing war project

[INFO] Copying webapp resources [C:\Users\MATEO-JL\workspace\SessionTest\src\main\webapp]

[INFO] Webapp assembled in [593 msecs]

[INFO] Building war: C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war

[INFO] WEB-INF\web.xml already added, skipping

[INFO]

[INFO] --- maven-install-plugin:2.4:install (default-install) @ SessionTest ---

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.war

[INFO] Installing C:\Users\MATEO-JL\workspace\SessionTest\pom.xml to Y:\00-Prod\Maven\repository\com\mat\SessionTest\0.0.1-SNAPSHOT\SessionTest-0.0.1-SNAPSHOT.pom

[INFO]

[INFO] --- cargo-maven2-plugin:1.4.13:deploy (default-cli) @ SessionTest ---

[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.13 for container tomcat8x

[INFO] [mcat8xRemoteDeployer] Deploying [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.838 s

[INFO] Finished at: 2015-04-16T16:01:36+02:00

[INFO] Final Memory: 17M/331M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]: Error writing request body to server -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy (default-cli) on project SessionTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

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

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.13:deploy failed: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

       ... 19 more

Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Users\MATEO-JL\workspace\SessionTest\target\SessionTest.war]

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)

       at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)

       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)

       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:435)

       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

       ... 20 more

Caused by: java.io.IOException: Error writing request body to server

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)

       at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)

       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:805)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:561)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:745)

       at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:309)

       at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:102)

       ... 25 more

[ERROR]

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

 

Here is my pom.xml:

 

<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.mat</groupId>

  <artifactId>SessionTest</artifactId>

  <packaging>war</packaging>

  <version>0.0.1-SNAPSHOT</version>

  <name>SessionTest Maven Webapp</name>

  <url>http://maven.apache.org%3c/url>

 

       <properties>

             <mvn.ver>3.3</mvn.ver>

             <jstl.ver>1.2</jstl.ver>

             <taglibs.ver>1.1.2</taglibs.ver>

             <servlet.ver>3.1.0</servlet.ver>

       </properties>

 

 

  <dependencies> 

       <dependency>

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

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

             <version>${mvn.ver}</version>

       </dependency>

 

       <dependency>

             <groupId>javax.servlet</groupId>

             <artifactId>javax.servlet-api</artifactId>

             <version>${servlet.ver}</version>

       </dependency>

      

       <dependency>

             <groupId>jstl</groupId>

             <artifactId>jstl</artifactId>

             <version>${jstl.ver}</version>

             <scope>compile</scope>

       </dependency>

 

       <dependency>

             <groupId>taglibs</groupId>

             <artifactId>standard</artifactId>

             <version>${taglibs.ver}</version>

       </dependency>

  </dependencies>

 

  <build>

       <plugins>

              <plugin>

             

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

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

            <version>1.4.13</version >

                    <configuration>

 

                           <container>

                                  <containerId>tomcat8x</containerId>

                                  <type>remote</type>

                           </container>

                                 

                           <configuration>

                                  <type>runtime</type>

                                        <properties>

                                               <cargo.hostname>127.0.0.1</cargo.hostname>

                                               <cargo.protocol>http</cargo.protocol>

                                               <cargo.servlet.port>8080</cargo.servlet.port>

                                               <cargo.remote.username>tomcat</cargo.remote.username>

                                               <cargo.remote.password>tomcat</cargo.remote.password>

                                        </properties>

                                  </configuration>

                           </configuration>

              </plugin>

       </plugins>

      

    <finalName>SessionTest</finalName>

 

  </build>

</project>

 

Any ideas on where should I look at ?

 

 

Best Regards

<img moz-do-not-send="true" id="Image_x0020_1" alt="blue_strip" src="wlmailhtml:%7B06D5E301-994B-4081-A0FB-C80E2240845F%7Dmid://00000024/%21cid:part13.07040708.08040705@alishomepage.com" width="128" border="0" height="3">

 

Jean-Louis Matéo

Support LiberTP – Atos France

Office : +33 (0)4 72 52 51 78

Mobile : +33 (0)6 87 72 71 43

[hidden email]

 

53, rue de l’Etang BP39

69578 Limonest cedex

 

www.atos.net­­­­­­­­­­­­­

<img moz-do-not-send="true" id="Image_x0020_2" alt="blue_strip" src="wlmailhtml:%7B06D5E301-994B-4081-A0FB-C80E2240845F%7Dmid://00000024/%21cid:part13.07040708.08040705@alishomepage.com" width="128" border="0" height="3">

<img moz-do-not-send="true" id="Image_x0020_3" alt="cid:image004.jpg@01D0149B.0E1B9740" src="wlmailhtml:%7B06D5E301-994B-4081-A0FB-C80E2240845F%7Dmid://00000024/%21cid:part17.09060609.02050507@alishomepage.com" width="78" border="0" height="34">

 

This e-mail contains material that is confidential for the sole use of the intended recipient.

Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited.

If you are not the intended recipient, please contact the sender and delete all copies.

<img moz-do-not-send="true" id="Image_x0020_4" alt="graphic" src="wlmailhtml:%7B06D5E301-994B-4081-A0FB-C80E2240845F%7Dmid://00000024/%21cid:part18.09040507.09080404@alishomepage.com" width="27" border="0" height="27">Think environment 

          Print only if necessary



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email