java.lang.IllegalArgumentException: Unable to resolve classname: URI
IliasDeros opened this issue · comments
Ilias Deros commented
Getting this error on compilation. Here's my code:
; Import
:dependencies [[org.clojure/clojure "1.7.0"]
[com.velisco/clj-ftp "0.3.12"]]
; Require
(:require [miner.ftp :as ftp])
; Code
(ftp/with-ftp [client "ftp://user:pwd@host/"]
(println "Client:" client))
Any idea what is missing to run an ftp pull here?
Full error:
java.lang.IllegalArgumentException: Unable to resolve classname: URI, compiling:(store_worker/sync/products.clj:371:3)
Exception in thread "main" java.lang.IllegalArgumentException: Unable to resolve classname: URI, compiling: ***Line that contains (ftp/with-ftp [client "ftp://user:pwd@host/"]***
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6730)
at clojure.lang.Compiler.analyze(Compiler.java:6524)
...
at clojure.main.main(main.java:37)
Steve Miner commented
Sorry, I don't know what's wrong. URI should refer to java.net.URI, which comes with Java. Can you try to test the clj-ftp project on your machine? Download the project source and run lein test
.
Ilias Deros commented
Running tests using a fresh project clone:
Ran 13 tests containing 34 assertions.
0 failures, 0 errors.
However, I could reproduce the error by changing the clojure version from 1.8 from 1.7:
Solution
Update project.clj's clojure version to >= 1.8:
[org.clojure/clojure "1.8.0"]