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

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

XMLWordPrintable

    • workflow-cps 2.62

      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

       

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

              Created:
              Updated:
              Resolved: