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

Putting a space at the end of Script Path causes java.io.FileNotFoundException

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      workflow-cps 2.62

      Description

      I configured a pipeline and under the Pipeline section specified the Script Path. Somehow a space was put onto the end of the file name, and this caused java.io.FileNotFoundException, when the job actually got called (in the Console Output)

      I would have thought the behaviour should be to strip superflous spaces from the end of fields.

      I would guess this is something that's pretty easy to fix, but it's caused me a whole world of pain trying to track it down as it's not at all obvious what the problem is.

      Here's the full error :-

      java.io.FileNotFoundException
      at jenkins.plugins.git.GitSCMFile$3.invoke(GitSCMFile.java:167)
      at jenkins.plugins.git.GitSCMFile$3.invoke(GitSCMFile.java:159)
      at jenkins.plugins.git.GitSCMFileSystem$3.invoke(GitSCMFileSystem.java:193)
      at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:72)
      at jenkins.plugins.git.GitSCMFileSystem.invoke(GitSCMFileSystem.java:189)
      at jenkins.plugins.git.GitSCMFile.content(GitSCMFile.java:159)
      at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:110)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE

       

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            This could perhaps trim().

            Show
            jglick Jesse Glick added a comment - This could perhaps trim() .
            Hide
            dnusbaum Devin Nusbaum added a comment -

            The fix for this issue was just released in version 2.62 of Pipeline Groovy Plugin.

            Show
            dnusbaum Devin Nusbaum added a comment - The fix for this issue was just released in version 2.62 of Pipeline Groovy Plugin.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            benston n Please do not change the status of a ticket without some kind of comment/justification.

            Show
            dnusbaum Devin Nusbaum added a comment - benston n Please do not change the status of a ticket without some kind of comment/justification.

              People

              • Assignee:
                sagarailani Sagar Ailani
                Reporter:
                sbutton Steve Button
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: