我们已经安排了一个 Jenkins 构建来创建 AWS 虚拟机,虚拟机成功上线,但是在归档工件时,作业失败并出现以下错误消息。
Archiving artifacts
ERROR: Step ‘Archive the artifacts’ aborted due to exception:
java.lang.NoClassDefFoundError: Could not initialize class sun.nio.fs.LinuxNativeDispatcher
at sun.nio.fs.LinuxUserDefinedFileAttributeView.copyExtendedAttributes(LinuxUserDefinedFileAttributeView.java:291)
at sun.nio.fs.LinuxFileSystem.copyNonPosixAttributes(LinuxFileSystem.java:72)
at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:267)
at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581)
at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
at java.nio.file.Files.copy(Files.java:1274)
at hudson.FilePath$31$1.visit(FilePath.java:2296)
at hudson.util.DirScanner.scanSingle(DirScanner.java:44)
at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2991)
at hudson.FilePath$31.invoke(FilePath.java:2290)
at hudson.FilePath$31.invoke(FilePath.java:2283)
at hudson.FilePath.act(FilePath.java:1042)
at hudson.FilePath.act(FilePath.java:1025)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2283)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:235)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1823)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
是什么导致了这个问题以及如何解决它?