java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20app%20(DEV)/workspace/email/target/test-classes/data/TestText.txt

Jenkins JIRA | Matthew Sexton | 5 months ago
  1. 0

    Issue set as minor due to available workaround. *Problem:* Where maven job names have spaces and files are used within the workspace, Jenkins cannot locate the file in the workspace because the url-encoded values do not match the literal value of the path on the host. Job name: "KEY (3) - Package app (DEV)" {code} java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20app%20(DEV)/workspace/email/target/test-classes/data/TestText.txt at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel(Files.java:317) at java.nio.file.Files.newByteChannel(Files.java:363) at java.nio.file.Files.readAllBytes(Files.java:2981) at com.company.a.e.ParserTest.setUp(ParserTest.java:50) {code} Where the file is validated and the literal path is /var/lib/jenkins/jobs/foldername/jobs/KEY (3) - Package app (DEV)/workspace/email/target/test-classes/data/TextTest.txt *Workaround:* Change the job name to "KEY3PackageAppDEV" removing all spaces allows the tests to locate the appropriate filepaths correctly - and the tests can be run without errors.

    Jenkins JIRA | 5 months ago | Matthew Sexton
    java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20app%20(DEV)/workspace/email/target/test-classes/data/TestText.txt
  2. 0

    Issue set as minor due to available workaround. *Problem:* Where maven job names have spaces and files are used within the workspace, Jenkins cannot locate the file in the workspace because the url-encoded values do not match the literal value of the path on the host. Job name: "KEY (3) - Package app (DEV)" {code} java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20app%20(DEV)/workspace/email/target/test-classes/data/TestText.txt at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel(Files.java:317) at java.nio.file.Files.newByteChannel(Files.java:363) at java.nio.file.Files.readAllBytes(Files.java:2981) at com.company.a.e.ParserTest.setUp(ParserTest.java:50) {code} Where the file is validated and the literal path is /var/lib/jenkins/jobs/foldername/jobs/KEY (3) - Package app (DEV)/workspace/email/target/test-classes/data/TextTest.txt *Workaround:* Change the job name to "KEY3PackageAppDEV" removing all spaces allows the tests to locate the appropriate filepaths correctly - and the tests can be run without errors.

    Jenkins JIRA | 5 months ago | Matthew Sexton
    java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20app%20(DEV)/workspace/email/target/test-classes/data/TestText.txt
  3. 0

    [JIRA] (JENKINS-36163) Spaces in Job Name Cause Maven Test Failures for File Input

    Google Groups | 5 months ago | sign...@gmail.com (JIRA)
    java.nio.file.NoSuchFileException: /<span class="code-keyword" style="color: #000091">var</span>/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20email%20(DEV)/workspace/email/target/test-classes/data/TextEmail.txt
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 10931#125679295

    GitHub | 1 year ago | jamespshields
    java.nio.file.NoSuchFileException: /var/run/secrets/kubernetes.io/serviceaccount/token
  6. 0

    Read Bytes from all files in folder

    Stack Overflow | 3 years ago | user2559055
    java.nio.file.NoSuchFileException: 601688450_eBill_20130708.pdf

  1. RoiOtero 4 times, last 2 months ago
  2. MoYapro 3 times, last 4 months ago
  3. Adarro 1 times, last 4 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.nio.file.NoSuchFileException

    /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20app%20(DEV)/workspace/email/target/test-classes/data/TestText.txt

    at sun.nio.fs.UnixException.translateToIOException()
  2. Java RT
    Files.readAllBytes
    1. sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    2. sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    3. sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    4. sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    5. java.nio.file.Files.newByteChannel(Files.java:317)
    6. java.nio.file.Files.newByteChannel(Files.java:363)
    7. java.nio.file.Files.readAllBytes(Files.java:2981)
    7 frames
  3. com.company.a
    ParserTest.setUp
    1. com.company.a.e.ParserTest.setUp(ParserTest.java:50)
    1 frame