Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38205

Failed to deploy war on Weblogic: task completed abnormally (exit code = 1)

    Details

    • Similar Issues:

      Description

      Hi, I want to install a war file generated from Jenkins to WebLogic, both on different machines, but when the installation runs an error is generated:
      java.lang.RuntimeException: task completed abnormally (exit code = 1)
      Your help please!

      Jenkins Console Output:
      [WeblogicDeploymentPlugin] - EXECUTING TASK ...
      $ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xms256M -Xmx256M -cp /var/jenkins_home/wls-deploy/weblogic.jar:/var/jenkins_home/wls-deploy/wlfullclient.jar:/var/jenkins_home/wls-deploy/wlthint3client.jar weblogic.Deployer -adminurl t3://10.211.55.3:12001 -user system -password system -deploy /var/jenkins_home/workspace/job-test-compile-build-deploy/dist/testcicd.war -remote -upload
      java.lang.RuntimeException: task completed abnormally (exit code = 1)
      at org.jenkinsci.plugins.deploy.weblogic.task.DeploymentTaskServiceImpl.customize(DeploymentTaskServiceImpl.java:340)
      at org.jenkinsci.plugins.deploy.weblogic.task.DeploymentTaskServiceImpl.perform(DeploymentTaskServiceImpl.java:173)
      at org.jenkinsci.plugins.deploy.weblogic.WeblogicDeploymentPlugin.perform(WeblogicDeploymentPlugin.java:304)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      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:1766)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      ERROR: [WeblogicDeploymentPlugin] - Failed to deploy.

      WebLogic Deployment Log:
      ------------------------------------ TASK EXECUTION ------------------------------------------------
      weblogic.Deployer invoked with options: -adminurl t3://10.211.55.3:12001 -user system -deploy /var/jenkins_home/workspace/job-test-compile-build-deploy/dist/testcicd.war -remote -upload
      java.lang.NoClassDefFoundError: weblogic/deploy/api/spi/DeploymentOptions
      at weblogic.deploy.api.tools.deployer.Jsr88Operation.init(Jsr88Operation.java:70)
      at weblogic.deploy.api.tools.deployer.Operation.(Operation.java:52)
      at weblogic.deploy.api.tools.deployer.Operation.(Operation.java:47)
      at weblogic.deploy.api.tools.deployer.Operation.(Operation.java:42)
      at weblogic.deploy.api.tools.deployer.Jsr88Operation.(Jsr88Operation.java:55)
      at weblogic.deploy.api.tools.deployer.DeployOperation.(DeployOperation.java:18)
      at weblogic.deploy.api.tools.deployer.Deployer.newOperation(Deployer.java:219)
      at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:86)
      at weblogic.utils.compiler.Tool.run(Tool.java:159)
      at weblogic.utils.compiler.Tool.run(Tool.java:116)
      at weblogic.Deployer.run(Deployer.java:74)
      at weblogic.Deployer.main(Deployer.java:55)
      Caused by: java.lang.ClassNotFoundException: weblogic.deploy.api.spi.DeploymentOptions
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 12 more
      weblogic/deploy/api/spi/DeploymentOptions

      Deployment Task Configuration (Job):
      The configuration can be seen in the attached images conf-1.png and conf-2.png.
      Command Line Options:
      -adminurl t3://10.211.55.3:12001 -user system -password system -deploy /var/jenkins_home/workspace/job-test-compile-build-deploy/dist/testcicd.war -remote -upload

      WebLogic Deployment Plugin Configuration:
      I tried several options, some of these options can be seen in the attached images weblogic-deployment-plugin-conf-1.png and weblogic-deployment-plugin-conf-2.png.

      plugin-configuration.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <config xmlns="http://org.jenkinsci.plugins/WeblogicDeploymentPlugin"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://localhost:32777/plugin/weblogic-deployer-plugin/config/plugin-configuration.xsd">
      <weblogic-targets>
      <weblogic-target>
      <name>wls-alpha</name>
      <host>10.211.55.3</host>
      <port>12001</port>
      <login>system</login>
      <password>system</password>
      <authMode>BY_LOGIN</authMode>
      </weblogic-target>
      </weblogic-targets>
      </config>

      Deploy from WebLogic Machine:
      The deploy from the weblogic machine is performed without errors, this can be seen in the attached image deploy-from-weblogic-machine.png

        Attachments

        1. conf-1.png
          conf-1.png
          170 kB
        2. conf-2.png
          conf-2.png
          96 kB
        3. deploy-from-weblogic-machine.png
          deploy-from-weblogic-machine.png
          39 kB
        4. image-2017-06-26-15-04-57-550.png
          image-2017-06-26-15-04-57-550.png
          53 kB
        5. image-2017-06-27-09-49-18-620.png
          image-2017-06-27-09-49-18-620.png
          27 kB
        6. image-2017-06-27-09-49-49-885.png
          image-2017-06-27-09-49-49-885.png
          2 kB
        7. image-2017-06-27-09-50-32-314.png
          image-2017-06-27-09-50-32-314.png
          18 kB
        8. node-job.png
          node-job.png
          23 kB
        9. weblogic-deployment-plugin-conf-1.png
          weblogic-deployment-plugin-conf-1.png
          120 kB
        10. weblogic-deployment-plugin-conf-2.png
          weblogic-deployment-plugin-conf-2.png
          149 kB
        11. weblogic-deployment-plugin-conf-3.png
          weblogic-deployment-plugin-conf-3.png
          117 kB
        12. weblogic-deployment-plugin-conf-4.png
          weblogic-deployment-plugin-conf-4.png
          120 kB
        13. wlfullclient-generation.png
          wlfullclient-generation.png
          19 kB

          Activity

          Hide
          ludmanl László Ludman added a comment -

          Hi,

          Still error

           

          Show
          ludmanl László Ludman added a comment - Hi, Still error  
          Hide
          christophlinder Christoph Linder added a comment -

          Same thing here.
          Using another jdk (1.8/1.7/1.6) does not help.

          What I see in the logs:

          ------------------------------------ ARTIFACT DEPLOYMENT ------------------------------------------------
          weblogic.Deployer invoked with options: -debug -stage -remote -verbose -upload -name foobar -source '/apps/jenkins/jobs/myjob_deploy/workspace/myapp.ear' -targets MyServer -adminurl t3://wls:7001 -user someuser -deploy

          ... and then:

          Deployment Options: {isRetireGracefully=true,isGracefulProductionToAdmin=false,isGracefulIgnoreSessions=false,rmiGracePeriod=-1,retireTimeoutSecs=-1,undeployAllVersions=false,archiveVersion=null,planVersion=null,isLibrary=false,libSpecVersion=null,libImplVersion=null,stageMode=stage,clusterTimeout=3600000,altDD=null,altWlsDD=null,name=foobar,securityModel=null,securityValidationEnabled=false,versionIdentifier=null,isTestMode=false,forceUndeployTimeout=0,defaultSubmoduleTargets=true,timeout=0,deploymentPrincipalName=null,useExpiredLock=falsespecifiedTargetsOnly=false}

          java.io.FileNotFoundException: /'/apps/jenkins/jobs/myjob_deploy/workspace/myapp.ear' (No such file or directory)
            at java.io.FileInputStream.open0(Native Method)
            at java.io.FileInputStream.open(FileInputStream.java:195)
            at java.io.FileInputStream.(FileInputStream.java:138)
            at weblogic.utils.FileUtils.copy(FileUtils.java:266)
            at weblogic.utils.FileUtils.copy(FileUtils.java:245)
            at weblogic.utils.FileUtils.copy(FileUtils.java:186)
            at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.upload(ServerConnectionImpl.java:849)
            at weblogic.deploy.api.spi.deploy.internal.BasicOperation.uploadFiles(BasicOperation.java:332)
            at weblogic.deploy.api.spi.deploy.internal.BasicOperation.execute(BasicOperation.java:465)
            at weblogic.deploy.api.spi.deploy.internal.BasicOperation.run(BasicOperation.java:178)
            at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.deploy(WebLogicDeploymentManagerImpl.java:390)
            at weblogic.deploy.api.tools.deployer.DeployOperation.execute(DeployOperation.java:51)
            at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:139)
            at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
            at weblogic.utils.compiler.Tool.run(Tool.java:158)
            at weblogic.utils.compiler.Tool.run(Tool.java:115)
            at weblogic.Deployer.run(Deployer.java:74)
            at weblogic.Deployer.main(Deployer.java:55)

          Please note the slash at the wrong place: /'/apps/jenkins
          These quotes might be wrong, too

           

          To reproduce this behaviour in a shell, i have to mis-quote the path to the war like this: -source /\'/apps/jenkins/jobs/myjob_deploy/workspace/myapp.ear\'

           

          Seems like some surplus quotes are passed to the java executable.

           

           

          Show
          christophlinder Christoph Linder added a comment - Same thing here. Using another jdk (1.8/1.7/1.6) does not help. What I see in the logs: ------------------------------------ ARTIFACT DEPLOYMENT ------------------------------------------------ weblogic.Deployer invoked with options: -debug -stage -remote -verbose -upload -name foobar -source '/apps/jenkins/jobs/myjob_deploy/workspace/myapp.ear' -targets MyServer -adminurl t3://wls:7001 -user someuser -deploy ... and then: Deployment Options: {isRetireGracefully=true,isGracefulProductionToAdmin=false,isGracefulIgnoreSessions=false,rmiGracePeriod=-1,retireTimeoutSecs=-1,undeployAllVersions=false,archiveVersion=null,planVersion=null,isLibrary=false,libSpecVersion=null,libImplVersion=null,stageMode=stage,clusterTimeout=3600000,altDD=null,altWlsDD=null,name=foobar,securityModel=null,securityValidationEnabled=false,versionIdentifier=null,isTestMode=false,forceUndeployTimeout=0,defaultSubmoduleTargets=true,timeout=0,deploymentPrincipalName=null,useExpiredLock=falsespecifiedTargetsOnly=false} java.io.FileNotFoundException: /'/apps/jenkins/jobs/myjob_deploy/workspace/myapp.ear' (No such file or directory)   at java.io.FileInputStream.open0(Native Method)   at java.io.FileInputStream.open(FileInputStream.java:195)   at java.io.FileInputStream.(FileInputStream.java:138)   at weblogic.utils.FileUtils.copy(FileUtils.java:266)   at weblogic.utils.FileUtils.copy(FileUtils.java:245)   at weblogic.utils.FileUtils.copy(FileUtils.java:186)   at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.upload(ServerConnectionImpl.java:849)   at weblogic.deploy.api.spi.deploy.internal.BasicOperation.uploadFiles(BasicOperation.java:332)   at weblogic.deploy.api.spi.deploy.internal.BasicOperation.execute(BasicOperation.java:465)   at weblogic.deploy.api.spi.deploy.internal.BasicOperation.run(BasicOperation.java:178)   at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.deploy(WebLogicDeploymentManagerImpl.java:390)   at weblogic.deploy.api.tools.deployer.DeployOperation.execute(DeployOperation.java:51)   at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:139)   at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)   at weblogic.utils.compiler.Tool.run(Tool.java:158)   at weblogic.utils.compiler.Tool.run(Tool.java:115)   at weblogic.Deployer.run(Deployer.java:74)   at weblogic.Deployer.main(Deployer.java:55) Please note the slash at the wrong place: /'/apps/jenkins These quotes might be wrong, too   To reproduce this behaviour in a shell, i have to mis-quote the path to the war like this: -source /\'/apps/jenkins/jobs/myjob_deploy/workspace/myapp.ear\'   Seems like some surplus quotes are passed to the java executable.    
          Hide
          raphc Raphael CHAUMIER added a comment -

          is a regression appeared in 3.7 version.

           

          Sorry, I will fix it in 4.0

          Show
          raphc Raphael CHAUMIER added a comment - is a regression appeared in 3.7 version.   Sorry, I will fix it in 4.0
          Hide
          raphc Raphael CHAUMIER added a comment -

          Hi Guillermo Figueroa

           

          I've just released the version 4.0. Let me know if it's ok for you.

          Show
          raphc Raphael CHAUMIER added a comment - Hi Guillermo Figueroa   I've just released the version 4.0. Let me know if it's ok for you.
          Hide
          raphc Raphael CHAUMIER added a comment -

          Hi Guillermo Figueroa

          I have no news. I guess it works so I'll close the ticket.

          Show
          raphc Raphael CHAUMIER added a comment - Hi Guillermo Figueroa I have no news. I guess it works so I'll close the ticket.

            People

            • Assignee:
              raphc Raphael CHAUMIER
              Reporter:
              guillermo_figueroa Guillermo Figueroa
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: