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.lang.IllegalArgumentException: Unable to resolve classname: URI #36

Closed
IliasDeros opened this issue Jun 21, 2020 · 2 comments
Closed

Comments

@IliasDeros
Copy link

IliasDeros commented Jun 21, 2020

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)
@miner
Copy link
Owner

miner commented Jun 23, 2020

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.

@IliasDeros
Copy link
Author

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"]

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

No branches or pull requests

2 participants