Automatic deploy with Jenkins/Tomcat7 - Failed to deploy application at context path

Asked

Viewed 199 times

1

I’m trying to set up the automated Jenkins deploy for a Tomcat7 server. I was able to get Jenkins to connect to the Tomcat manager normally, but for some reason almost at the end of the deployment process he drops the stack below.

Does anyone have any idea how to fix?

BUILD SUCCESSFUL Total time: 3 minutes 12 Archiving artifacts Deploying /var/lib/Jenkins/Workspace/UNIVERSAL_DS_ODONTO_PR/dist/universal.War to container Tomcat 7.x Remote
[/var/lib/Jenkins/Workspace/UNIVERSAL_DS_ODONTO_PR/dist/universal.War] is not Deployed. Doing a Fresh Deployment. Deploying [/var/lib/Jenkins/Workspace/UNIVERSAL_DS_ODONTO_PR/dist/universal.War] ERROR: Build step failed with Exception org.codehaus.cargo.container.Containerexception: Failed to deploy [/var/lib/Jenkins/Workspace/UNIVERSAL_DS_ODONTO_PR/dist/universal.War] at org.codehaus.cargo.container.Tomcat.internal.Abstracttomcatmanagerdeployer.deploy(Abstracttomcatmanagerdeployer.java:107) at org.codehaus.cargo.container.Tomcat.internal.Abstracttomcatmanagerdeployer.redeploy(Abstracttomcatmanagerdeployer.java:185) at Hudson.plugins.deploy.CargoContainerAdapter.deploy(Cargocontaineradapter.java:73) at Hudson.plugins.deploy.Cargocontaineradapter$1.invoke(Cargocontaineradapter.java:116) at Hudson.plugins.deploy.Cargocontaineradapter$1.invoke(Cargocontaineradapter.java:103) at Hudson.FilePath.Act(Filepath.java:1018) at Hudson.FilePath.Act(Filepath.java:996) at Hudson.plugins.deploy.CargoContainerAdapter.redeploy(Cargocontaineradapter.java:103) at Hudson.plugins.deploy.DeployPublisher.perform(Deploypublisher.java:61) at Hudson.tasks.Buildstepmonitor$3.perform(Buildstepmonitor.java:45) at Hudson.model.Abstractbuild$Abstractbuildexecution.perform(Abstractbuild.java:779) at Hudson.model.Abstractbuild$Abstractbuildexecution.performAllBuildSteps(Abstractbuild.java:720) at Hudson.model.Build$Buildexecution.post2(Build.java:185) at Hudson.model.Abstractbuild$Abstractbuildexecution.post(Abstractbuild.java:665) at Hudson.model.Run.execute(Run.java:1745) at Hudson.model.Freestylebuild.run(Freestylebuild.java:43) at Hudson.model.Resourcecontroller.execute(Resourcecontroller.java:98) at Hudson.model.Executor.run(Executor.java:404) Caused by: org.codehaus.cargo.container.Tomcat.internal.Tomcatmanagerexception: FAIL - Failed to deploy application at context path /universal

at org.codehaus.cargo.container.Tomcat.internal.Tomcatmanager.invoke(Tomcatmanager.java:566) at org.codehaus.cargo.container.Tomcat.internal.Tomcatmanager.deployImpl(Tomcatmanager.java:611) at org.codehaus.cargo.container.Tomcat.internal.Tomcatmanager.deploy(Tomcatmanager.java:291) at org.codehaus.cargo.container.Tomcat.internal.Abstracttomcatmanagerdeployer.deploy(Abstracttomcatmanagerdeployer.java:102) ... 17 more org.codehaus.cargo.container.Tomcat.internal.Tomcatmanagerexception: FAIL - Failed to deploy application at context path /universal

at org.codehaus.cargo.container.Tomcat.internal.Tomcatmanager.invoke(Tomcatmanager.java:566) at org.codehaus.cargo.container.Tomcat.internal.Tomcatmanager.deployImpl(Tomcatmanager.java:611) at org.codehaus.cargo.container.Tomcat.internal.Tomcatmanager.deploy(Tomcatmanager.java:291) at org.codehaus.cargo.container.Tomcat.internal.Abstracttomcatmanagerdeployer.deploy(Abstracttomcatmanagerdeployer.java:102) at org.codehaus.cargo.container.Tomcat.internal.Abstracttomcatmanagerdeployer.redeploy(Abstracttomcatmanagerdeployer.java:185) at Hudson.plugins.deploy.CargoContainerAdapter.deploy(Cargocontaineradapter.java:73) at Hudson.plugins.deploy.Cargocontaineradapter$1.invoke(Cargocontaineradapter.java:116) at Hudson.plugins.deploy.Cargocontaineradapter$1.invoke(Cargocontaineradapter.java:103) at Hudson.FilePath.Act(Filepath.java:1018) at Hudson.FilePath.Act(Filepath.java:996) at Hudson.plugins.deploy.CargoContainerAdapter.redeploy(Cargocontaineradapter.java:103) at Hudson.plugins.deploy.DeployPublisher.perform(Deploypublisher.java:61) at Hudson.tasks.Buildstepmonitor$3.perform(Buildstepmonitor.java:45) at Hudson.model.Abstractbuild$Abstractbuildexecution.perform(Abstractbuild.java:779) at Hudson.model.Abstractbuild$Abstractbuildexecution.performAllBuildSteps(Abstractbuild.java:720) at Hudson.model.Build$Buildexecution.post2(Build.java:185) at Hudson.model.Abstractbuild$Abstractbuildexecution.post(Abstractbuild.java:665) at Hudson.model.Run.execute(Run.java:1745) at Hudson.model.Freestylebuild.run(Freestylebuild.java:43) at Hudson.model.Resourcecontroller.execute(Resourcecontroller.java:98) at Hudson.model.Executor.run(Executor.java:404) Build step 'Deploy War/Ear to a container' marked build as Failure Finished: FAILURE

Context.xml

<Context path="/universal"   reloadable="true" crossContext="true">
    <Resource name="jdbc/infodata" auth="Container" type="javax.sql.DataSource"
              maxActive="100" maxIdle="30" maxWait="10000" username="xxx" password="xxx"
              driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
              url="jdbc:sqlserver://xxx;instanceName=SQLEXPRESS;databaseName=xxxx" />
</Context> 

1 answer

0

I found the solution. This stacktrace only indicates in a generic way that the application did not go up in Tomcat, to find the error that caused the deployment failure just look at the application log in Tomcat.

In my case specifically the problem was that the application server was with Openjdk 6 and my application uses Java 7 components, thus generating the error Unsupported major.minor version 51.0 in the Tomcat log. But it could have been any other error that would have caused the same message in Jenkins.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.