Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.nio.file.FileAlreadyExistsException with 2.5.0 #361

Closed
flyingmachine opened this issue Dec 17, 2015 · 2 comments
Closed

java.nio.file.FileAlreadyExistsException with 2.5.0 #361

flyingmachine opened this issue Dec 17, 2015 · 2 comments
Labels

Comments

@flyingmachine
Copy link

I'm getting this exception:

Writing pom.xml and pom.properties...
Adding uberjar entries...
              clojure.lang.ExceptionInfo: java.nio.file.FileAlreadyExistsException: /Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/f0sqpx/META-INF/LICENSE -> /Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/-7kd6cy/0ee08843093c5758536dc3e48dafa949.1450364772000
    data: {:file
           "/var/folders/r9/q84t_zy931x_9qx87db0zgdc0000gn/T/boot.user2865336977302176468.clj",
           :line 21}
 java.util.concurrent.ExecutionException: java.nio.file.FileAlreadyExistsException: /Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/f0sqpx/META-INF/LICENSE -> /Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/-7kd6cy/0ee08843093c5758536dc3e48dafa949.1450364772000
java.nio.file.FileAlreadyExistsException: /Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/f0sqpx/META-INF/LICENSE -> /Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/-7kd6cy/0ee08843093c5758536dc3e48dafa949.1450364772000
         file: "/Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/f0sqpx/META-INF/LICENSE"
    otherFile: "/Users/daniel/.boot/cache/tmp/Users/daniel/tmp/boot-test/1bkh/-7kd6cy/0ee08843093c5758536dc3e48dafa949.1450364772000"
sun.nio.fs.UnixException.translateToIOException           UnixException.java:   88
  sun.nio.fs.UnixException.rethrowAsIOException           UnixException.java:  102
   sun.nio.fs.UnixFileSystemProvider.createLink  UnixFileSystemProvider.java:  476
                                            ...                                   
                            boot.file/hard-link                     file.clj:  145
                    boot.file/copy-with-lastmod                     file.clj:  161
                 boot.tmpdir.TmpFileSet/commit!                   tmpdir.clj:  230
                              boot.core/commit!                     core.clj:  391
                 boot.task.built-in/fn/fn/fn/fn                 built_in.clj:  495
                 boot.task.built-in/fn/fn/fn/fn                 built_in.clj:  340
                            boot.core/run-tasks                     core.clj:  797
                              boot.core/boot/fn                     core.clj:  807
            clojure.core/binding-conveyor-fn/fn                     core.clj: 1916

Here's a minimal build.boot:

(set-env!
 :source-paths   #{"src"}
 :resource-paths #{"resources"}
 :dependencies '[[com.datomic/datomic-free   "0.9.5206"]])

(deftask build
  "Builds an uberjar"
  []
  (comp (pom :project 'test :version "0.1.0")
        (uber)
        (aot :namespace '#{test.core})
        (jar :main 'test.core)))

test.core/-main just prints "hello world", and there aren't any other files.

@micha micha added the Bug label Dec 17, 2015
@micha
Copy link
Contributor

micha commented Dec 17, 2015

@flyingmachine I think this may be fixed by one of the commits we made today...but I'm not sure. I just tried with boot version 2.5.1-SNAPSHOT and everything is ok, as far as I can tell. I did need to add Clojure to :dependencies and (:gen-class) to the test.core namespace declaration. Can you please try with 2.5.1-SNAPSHOT and see if the problem still exists?

You can use a snapshot version of boot by setting BOOT_VERSION=2.5.1-SNAPSHOT in your boot.properties file.

@danielsz
Copy link
Contributor

I've seen very similar errors, but I had all reasons to suspect something was amiss with the filesystem. Lo and behold, after running fsck on the partition, the errors went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants