سؤال

I can't figure out why I'm getting the following compile error after upgrading:

Compiling addr-verify.core
Exception in thread "main" java.lang.NoClassDefFoundError: 
clojure/lang/ILookupHost, compiling:(core.clj:39:1)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3463)

I am using leiningen 2.3.4, and am trying to upgrade an application to use Clojure 1.5.1 and some dependencies. This compiled fine with the old project.clj. But I want to use the Clojure 1.5.1. I'm just confused as to what is causing this.

These are the differences between the two project.clj versions.

< (defproject addr-verify "1.0.0-SNAPSHOT"

> (defproject addr-verify "1.0.1-SNAPSHOT"

<   :dependencies [[org.clojure/clojure "1.2.1"]
<                  [org.clojure/clojure-contrib "1.2.0"]
<                  [clojure-csv/clojure-csv "1.2.4"]
<                  [org.clojure/tools.cli "0.1.0"]
<                  [clj-http "0.1.3"]]
<    :main addr-verify.core)

>   :dependencies [[org.clojure/clojure "1.5.1"]
>                  [clojure-csv/clojure-csv "2.0.1"]
>                  [org.clojure/tools.cli "0.3.1"]
>                  [clj-http "0.9.1"]]
>    :omit-source true
>    :main addr-verify.core
>    :aot  [addr-verify.core])
هل كانت مفيدة؟

المحلول

Run lein clean, if you haven't yet.

Sometimes compiled artifacts are created and reused, and this can cause problems when you have library version changes. lein clean clears out those artifacts.

نصائح أخرى

ILookupHost was removed as of Clojure 1.3.0, so perhaps you have an old compilation artifact or compiled dependency.

The most recent version of Clojure is 1.6.0 - why not upgrade to there instead?

I'm not sure what the differences are, but I usually use org.clojure/data.csv as my CSV library. Might be worth looking into.

If you need help finding old contrib, see: http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top