Skip to content

NoSuchFileException when executing tests #3199

@Gregvh

Description

@Gregvh

Affected version

3.5.4

Bug description

Hello,
We are getting the error below in about 20% of our builds.
We don't know what triggers it.
Our builds are executed in docker containers so they should be pretty consistent...
Any ideas of the root cause ?
We are using java 21, maven 3.9.9 and surefire 3.5.4.
Thanks in advance for any help you can provide !

[2025-10-02T16:15:31.465Z] [INFO] ----------------------< com.swift.amh:framework >-----------------------
[2025-10-02T16:15:31.465Z] [INFO] Building framework 6.0.0-SNAPSHOT [5/260]
[2025-10-02T16:15:31.465Z] [INFO] from framework/pom.xml
[2025-10-02T16:15:31.465Z] [INFO] --------------------------------[ jar ]---------------------------------
[2025-10-02T16:15:31.465Z] [INFO]
[2025-10-02T16:15:31.465Z] [INFO] --- jacoco:0.8.12:prepare-agent (prepare-unit_reporting) @ framework ---
[2025-10-02T16:15:31.465Z] [INFO] surefire.jacoco.args set to -javaagent:/home/jenkins/agent/workspace/AMH_amh-build_PR-8424/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=/home/jenkins/agent/workspace/AMH_amh-build_PR-8424/framework/target/jacoco-output/jacoco-unit-test.exec,excludes=/generated*/:**/*.jar
[2025-10-02T16:15:31.465Z] [INFO]
[2025-10-02T16:15:31.465Z] [INFO] --- surefire:3.5.4:test (default-cli) @ framework ---
[2025-10-02T16:15:31.465Z] [INFO] Surefire report directory: /home/jenkins/agent/workspace/AMH_amh-build_PR-8424/framework/target/surefire-reports
[2025-10-02T16:15:31.465Z] [INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[2025-10-02T16:15:31.465Z] [INFO]
[2025-10-02T16:15:31.465Z] [INFO] -------------------------------------------------------
[2025-10-02T16:15:31.465Z] [INFO] T E S T S
[2025-10-02T16:15:31.465Z] [INFO] -------------------------------------------------------
[2025-10-02T16:15:31.722Z] Error: An unexpected error occurred while trying to open file /home/jenkins/agent/workspace/AMH_amh-build_PR-8424/framework/target/surefire/surefirebooter-20251002161531453_32.jar
[2025-10-02T16:15:31.722Z] java.nio.file.NoSuchFileException: /home/jenkins/agent/workspace/AMH_amh-build_PR-8424/framework/target/surefire/surefirebooter-20251002161531453_32.jar
[2025-10-02T16:15:31.722Z] at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
[2025-10-02T16:15:31.722Z] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
[2025-10-02T16:15:31.722Z] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[2025-10-02T16:15:31.722Z] at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
[2025-10-02T16:15:31.722Z] at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
[2025-10-02T16:15:31.722Z] at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
[2025-10-02T16:15:31.722Z] at java.base/java.nio.file.Files.readAttributes(Files.java:1853)
[2025-10-02T16:15:31.722Z] at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
[2025-10-02T16:15:31.722Z] at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:724)
[2025-10-02T16:15:31.722Z] at java.base/java.util.zip.ZipFile.(ZipFile.java:251)
[2025-10-02T16:15:31.722Z] at java.base/java.util.zip.ZipFile.(ZipFile.java:180)
[2025-10-02T16:15:31.722Z] at java.base/java.util.jar.JarFile.(JarFile.java:345)
[2025-10-02T16:15:31.722Z] at java.base/java.util.jar.JarFile.(JarFile.java:316)
[2025-10-02T16:15:31.722Z] at java.base/java.util.jar.JarFile.(JarFile.java:255)
[2025-10-02T16:15:31.722Z] at java.base/sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:558)
[2025-10-02T16:15:31.722Z] at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:784)
[2025-10-02T16:15:31.722Z] at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:692)
[2025-10-02T16:15:31.979Z] [INFO]
[2025-10-02T16:15:31.979Z] [INFO] Results:
[2025-10-02T16:15:31.979Z] [INFO]
[2025-10-02T16:15:31.979Z] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions