Skip to content

Instantly share code, notes, and snippets.

@drewr
Created November 9, 2015 23:03
Show Gist options
  • Select an option

  • Save drewr/04e1fd18e66ee5c6f37d to your computer and use it in GitHub Desktop.

Select an option

Save drewr/04e1fd18e66ee5c6f37d to your computer and use it in GitHub Desktop.
Touching the filesystem from Java in a Jenkins run is tricky
Started by user anonymous
Building remotely on hotel (server) in workspace /h/jenkins/workspace/elastic,runbld,master
No JDK named ‘null’ found
[elastic,runbld,master] $ /usr/local/bin/runbld /tmp/hudson5777054172083384843.sh
user.dir /h/jenkins/workspace/elastic,runbld,master
>>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
"repo dir" "/h/jenkins/git-cache/elastic/runbld"
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
at java.io.File.toPath(File.java:2234)
at org.eclipse.jgit.util.FileUtil.exists(FileUtil.java:116)
at org.eclipse.jgit.util.FS_POSIX_Java7.exists(FS_POSIX_Java7.java:294)
at org.eclipse.jgit.internal.storage.file.ObjectDirectory.exists(ObjectDirectory.java:191)
at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:207)
at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:577)
at clj_jgit.porcelain$load_repo.invoke(porcelain.clj:65)
at runbld.vcs.git$try_repo.invoke(git.clj:29)
at runbld.vcs.git$clone_or_fetch.invoke(git.clj:48)
at runbld.vcs.git$checkout_workspace.invoke(git.clj:63)
at runbld.build$wrap_git_repo$fn__3029.invoke(build.clj:47)
at runbld.build$wrap_merge_profile$fn__3037.invoke(build.clj:56)
at runbld.build$wrap_build_meta$fn__3041.invoke(build.clj:81)
at runbld.env$wrap_env$fn__1571.invoke(env.clj:23)
at runbld.main$_main.doInvoke(main.clj:52)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at runbld.main.main(Unknown Source)
Caused by: java.security.PrivilegedActionException: sun.nio.fs.UnixException: No such file or directory
at java.security.AccessController.doPrivileged(Native Method)
at java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:96)
at java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:90)
... 18 more
Caused by: sun.nio.fs.UnixException: No such file or directory
at sun.nio.fs.UnixNativeDispatcher.getcwd(Native Method)
at sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:67)
at sun.nio.fs.LinuxFileSystem.<init>(LinuxFileSystem.java:39)
at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:46)
at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
at sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
at sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvider.java:41)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at sun.nio.fs.DefaultFileSystemProvider.createProvider(DefaultFileSystemProvider.java:48)
at sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:63)
at java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108)
at java.nio.file.FileSystems$DefaultFileSystemHolder.access$000(FileSystems.java:89)
at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98)
at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:96)
... 21 more
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment