Apache Tomcat Maven Plugin
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-166

Cannot invoke Tomcat manager:Cannot retry request with a non-repeatable request entity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0-beta-1
    • Fix Version/s: 2.0
    • Component/s: tomcat7
    • Labels:
      None
    • Environment:
      maven-2,windows 7

      Description

      i am using *tomcat7-maven-plugin* to deploy application to remote server

      *1- plugin configuration:*

      <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <artifactId>tomcat7-maven-plugin</artifactId>
      <version>2.0-beta-1</version>
      <configuration>
      <server>pb</server>
      <url>http://mydomain:8080/manager/html</url>
      </configuration>
      </plugin>

      *2- settings.xml:*

      <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
      http://maven.apache.org/xsd/settings-1.0.0.xsd">

      <servers>
      <server>
      <id>pb</id>
      <username>myuser</username>
      <password>mypass</password>
      </server>
      </servers>

      </settings>

      and i am using the command: `mvn tomcat7:deploy`

      and i can see that the war file is deployed:

      [INFO] Deploying war to http://mydomain.com:8080/myapp
      Uploading: http://mydomain.com:8080/manager/html/deploy?path=%2Fmyapp
      Uploaded: http://mydomain.com:8080/manager/html/deploy?path=%2Fmyapp (5932 KB at 18.9 KB/sec)

      and after that i am getting the error:

      Cannot invoke Tomcat manager:Cannot retry request with a non-repeatable request entity.

      detailed exception:

      org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke Tomcat manager
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke Tomcat manager
      at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:152)
      at org.apache.tomcat.maven.plugin.tomcat7.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:71)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      ... 17 more
      Caused by: org.apache.http.client.ClientProtocolException
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:926)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
      at org.apache.tomcat.maven.common.deployer.TomcatManager.invoke(TomcatManager.java:718)
      at org.apache.tomcat.maven.common.deployer.TomcatManager.deployImpl(TomcatManager.java:681)
      at org.apache.tomcat.maven.common.deployer.TomcatManager.deploy(TomcatManager.java:363)
      at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:88)
      at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:87)
      at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:143)
      ... 20 more
      Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity.
      at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:686)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:923)

      please advise why i am getting this error, and how to fix it.

        Issue Links

          Activity

          Mahmoud Saleh created issue -
          Mahmoud Saleh made changes -
          Field Original Value New Value
          Description i am using **tomcat7-maven-plugin** to deploy application to remote server

          **1- plugin configuration:**


                       <plugin>
                          <groupId>org.apache.tomcat.maven</groupId>
                          <artifactId>tomcat7-maven-plugin</artifactId>
                          <version>2.0-beta-1</version>
                          <configuration>
                            <server>pb</server>
                            <url>http://mydomain:8080/manager/html&lt;/url>
                          </configuration>
                      </plugin>

          **2- settings.xml:**

              <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                                    http://maven.apache.org/xsd/settings-1.0.0.xsd">
              
              
                <servers>
                <server>
                      <id>pb</id>
                      <username>myuser</username>
                      <password>mypass</password>
                </server>
                </servers>
              
              </settings>

          and i am using the command: `mvn tomcat7:deploy`

          and i can see that the war file is deployed:

              [INFO] Deploying war to http://mydomain.com:8080/myapp
              Uploading: http://mydomain.com:8080/manager/html/deploy?path=%2Fmyapp
              Uploaded: http://mydomain.com:8080/manager/html/deploy?path=%2Fmyapp (5932 KB at 18.9 KB/sec)

          and after that i am getting the error:

              Cannot invoke Tomcat manager:Cannot retry request with a non-repeatable request entity.

          please advise why i am getting this error, and how to fix it.
          i am using **tomcat7-maven-plugin** to deploy application to remote server

          **1- plugin configuration:**


                       <plugin>
                          <groupId>org.apache.tomcat.maven</groupId>
                          <artifactId>tomcat7-maven-plugin</artifactId>
                          <version>2.0-beta-1</version>
                          <configuration>
                            <server>pb</server>
                            <url>http://mydomain:8080/manager/html&lt;/url>
                          </configuration>
                      </plugin>

          **2- settings.xml:**

              <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                                    http://maven.apache.org/xsd/settings-1.0.0.xsd">
              
              
                <servers>
                <server>
                      <id>pb</id>
                      <username>myuser</username>
                      <password>mypass</password>
                </server>
                </servers>
              
              </settings>

          and i am using the command: `mvn tomcat7:deploy`

          and i can see that the war file is deployed:

              [INFO] Deploying war to http://mydomain.com:8080/myapp
              Uploading: http://mydomain.com:8080/manager/html/deploy?path=%2Fmyapp
              Uploaded: http://mydomain.com:8080/manager/html/deploy?path=%2Fmyapp (5932 KB at 18.9 KB/sec)

          and after that i am getting the error:

              Cannot invoke Tomcat manager:Cannot retry request with a non-repeatable request entity.

          detailed exception:

          org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke Tomcat manager
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
                  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
                  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
                  at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                  at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:597)
                  at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                  at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
          Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke Tomcat manager
                  at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:152)
                  at org.apache.tomcat.maven.plugin.tomcat7.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:71)
                  at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
                  ... 17 more
          Caused by: org.apache.http.client.ClientProtocolException
                  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:926)
                  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
                  at org.apache.tomcat.maven.common.deployer.TomcatManager.invoke(TomcatManager.java:718)
                  at org.apache.tomcat.maven.common.deployer.TomcatManager.deployImpl(TomcatManager.java:681)
                  at org.apache.tomcat.maven.common.deployer.TomcatManager.deploy(TomcatManager.java:363)
                  at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:88)
                  at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:87)
                  at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:143)
                  ... 20 more
          Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity.
                  at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:686)
                  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
                  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:923)

          please advise why i am getting this error, and how to fix it.
          Olivier Lamy (*$^¨%`£) made changes -
          Link This issue duplicates MTOMCAT-116 [ MTOMCAT-116 ]
          Hide
          Olivier Lamy (*$^¨%`£) added a comment -

          dup of MTOMCAT-116

          Show
          Olivier Lamy (*$^¨%`£) added a comment - dup of MTOMCAT-116
          Olivier Lamy (*$^¨%`£) made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.0 [ 12319450 ]
          Resolution Duplicate [ 3 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          15h 58m 1 Olivier Lamy (*$^¨%`£) 01/Jul/12 08:25

            People

            • Assignee:
              Olivier Lamy (*$^¨%`£)
              Reporter:
              Mahmoud Saleh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development