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

Un-escaped $ in module file name passed in command line to weblogic.jar results in the input file not found deployer

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Linux

      My build utput produced by "mvn install" looks a bit like this:

      /home/ca31319/archdata/jenkins/jobs/Epdservices/modules/org.delta$org.delta.epd.services/builds/2014-01-06_14-08-56/archive/org.delta/org.delta.epd.services/1.0-SNAPSHOT/org.delta.epd.services-1.0-SNAPSHOT.war

      Notice the "$" in the module result.

      This file name is passed on the command line to weblogic.jar without the "$" being escaped - hence the file is not found.

      /usr/java/jdk1.7.0_45/jre/bin/java -Xms256M -Xmx256M -cp /opt/oracle/wls12120/wlserver/server/lib/weblogic.jar weblogic.Deployer -debug -stage -remote -verbose -upload -name "EPD Services" -source /home/ca31319/archdata/jenkins/jobs/Epdservices/modules/org.delta$org.delta.epd.services/builds/2014-01-06_14-08-56/archive/org.delta/org.delta.epd.services/1.0-SNAPSHOT/org.delta.epd.services-1.0-SNAPSHOT.war -targets myserver -adminurl t3://myhost:7001 -user weblogic -password mypassword -deploy

      If I cut and paste this into a terminal and escape the $ - it works fine.

      Please could you provide a fix?

          [JENKINS-21244] Un-escaped $ in module file name passed in command line to weblogic.jar results in the input file not found deployer

          3.1 released on 03/31/2015

          Raphael CHAUMIER added a comment - 3.1 released on 03/31/2015

          trevorw added a comment -

          Hello. Bad news, just tried 3.1 and it broke all the deploys. There is a leading / before the " string breaking things now.

          java.io.FileNotFoundException: /"/opt/jenkins/workspace/app-name-deploy/app-name-application/target/app-name-application-1.0.0-SNAPSHOT.war" (No such file or directory)

          trevorw added a comment - Hello. Bad news, just tried 3.1 and it broke all the deploys. There is a leading / before the " string breaking things now. java.io.FileNotFoundException: /"/opt/jenkins/workspace/app-name-deploy/app-name-application/target/app-name-application-1.0.0-SNAPSHOT.war" (No such file or directory)

          Hi,

          Thank you for your feedback. If you use the advanced configuration with "

          {wl.source}

          " does the '/' prepend ?

          Pehraps with single quotes?

          Raphael CHAUMIER added a comment - Hi, Thank you for your feedback. If you use the advanced configuration with " {wl.source} " does the '/' prepend ? Pehraps with single quotes?

          trevorw added a comment -

          Using the advanced configuration you posted above, the quoted string is good and does not prepend the '/'.

          Here it is using the advanced config:
          -source "/opt/jenkins/jobs/app-name-build-deploy/modules/com.apps.app-name$app-name-web/builds/51/archive/com.apps.app-name/app-name-web/1.0.0-20150401.222231-10/app-name-web-1.0.0-20150401.222231-10.war"

          trevorw added a comment - Using the advanced configuration you posted above, the quoted string is good and does not prepend the '/'. Here it is using the advanced config: -source "/opt/jenkins/jobs/app-name-build-deploy/modules/com.apps.app-name$app-name-web/builds/51/archive/com.apps.app-name/app-name-web/1.0.0-20150401.222231-10/app-name-web-1.0.0-20150401.222231-10.war"

          Thanks,

          So the problem only occurs if you don't use advanced configuration.

          Raphael CHAUMIER added a comment - Thanks, So the problem only occurs if you don't use advanced configuration.

          Using single quotes instead of using double one.

          Hope it will work

          Raphael CHAUMIER added a comment - Using single quotes instead of using double one. Hope it will work

          Tested. 

          Raphael CHAUMIER added a comment - Tested. 

          After updating to v. 3.7 deployments fail because a slash is prepended to the file path:

          java.io.FileNotFoundException: /'/opt/jenkins/jobs/AF_HerramientasEstandares/jobs/Comprobar_Actualizaciones/jobs/JWL2-Gesid_Deploy/workspace/gesid-3.2.1-desarrollo.war' (No existe el fichero o el directorio)

           

          Manuel J. Garrido added a comment - After updating to v. 3.7 deployments fail because a slash is prepended to the file path: java.io.FileNotFoundException: /'/opt/jenkins/jobs/AF_HerramientasEstandares/jobs/Comprobar_Actualizaciones/jobs/JWL2-Gesid_Deploy/workspace/gesid-3.2.1-desarrollo.war' (No existe el fichero o el directorio)  

          Hi mgarrido

           

          This is a regression. You can downgrade to 3.6 or wait the 4.0 which will be released today.

           

          Regards

          Raphael CHAUMIER added a comment - Hi mgarrido   This is a regression. You can downgrade to 3.6 or wait the 4.0 which will be released today.   Regards

          double/single-quoted source seems only work with windows architecture. Need to investigate about another solution for others OS.

          Raphael CHAUMIER added a comment - double/single-quoted source seems only work with windows architecture. Need to investigate about another solution for others OS.

            mgarrido Manuel J. Garrido
            adrianblakey Adrian Blakey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: