Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Classpath conflict: org.clojure/clojure version 1.7.0 already loaded, NOT loading version 1.8.0

When copying a build.boot file from an old project to a new one I got the following error and found nothing on Google:

Classpath conflict: org.clojure/clojure version 1.7.0 already loaded, NOT loading version 1.8.0

like image 612
wizmer Avatar asked Mar 25 '17 16:03

wizmer


2 Answers

You should just include [org.clojure/clojure "1.8.0"] with the same version as boot environment variable BOOT_CLOJURE_VERSION=1.8.0

into build.boot dependencies list.

Another way to get rid of this issues is to exclude clojure dependency from several dependencies in the list.

boot show -d

Will show your list of dependencies,

Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
2018-01-16 15:05:21.023:INFO::main: Logging initialized @6899ms
[adzerk/boot-cljs "2.1.4" :scope "test"]
[adzerk/boot-reload "0.5.2" :scope "test"]
[hiccup "1.0.5"]
[org.clojure/clojurescript "1.9.946"]
├── [com.google.javascript/closure-compiler-unshaded "v20170910"]
│   ├── [args4j "2.33"]
│   ├── [com.google.code.findbugs/jsr305 "3.0.1"]
│   ├── [com.google.code.gson/gson "2.7"]
│   ├── [com.google.errorprone/error_prone_annotations "2.0.18"]
│   ├── [com.google.guava/guava "20.0"]
│   ├── [com.google.javascript/closure-compiler-externs "v20170910"]
│   ├── [com.google.jsinterop/jsinterop-annotations "1.0.0"]
│   └── [com.google.protobuf/protobuf-java "3.0.2"]
├── [org.clojure/google-closure-library "0.0-20170809-b9c14c6b"]
│   └── [org.clojure/google-closure-library-third-party "0.0-20170809-b9c14c6b"]
├── [org.clojure/tools.reader "1.1.0"]
└── [org.mozilla/rhino "1.7R5"]
[org.clojure/data.json "0.2.6"]
[pandeiro/boot-http "0.8.3"]
└── [org.clojure/clojure "1.7.0"]
[ring/ring-core "1.6.3" :exclusions [[org.clojure/clojure]]]
├── [clj-time "0.11.0"]
│   └── [joda-time "2.8.2"]
├── [commons-fileupload "1.3.3"]
├── [commons-io "2.5"]
├── [crypto-equality "1.0.0"]
├── [crypto-random "1.2.0"]
└── [ring/ring-codec "1.0.1"]
    └── [commons-codec "1.6"]
[ring/ring-jetty-adapter "1.6.3" :exclusions [[org.clojure/clojure]]]
├── [org.eclipse.jetty/jetty-server "9.2.21.v20170120"]
│   ├── [javax.servlet/javax.servlet-api "3.1.0"]
│   ├── [org.eclipse.jetty/jetty-http "9.2.21.v20170120"]
│   │   └── [org.eclipse.jetty/jetty-util "9.2.21.v20170120"]
│   └── [org.eclipse.jetty/jetty-io "9.2.21.v20170120"]
└── [ring/ring-servlet "1.6.3"]

As you can see here is:

[pandeiro/boot-http "0.8.3"]
└─[org.clojure/clojure "1.7.0"]

dependency, which boot is complaining on. So, what I did to get rid of this dependency is to make exclusion in build.boot like here:

[pandeiro/boot-http "0.8.3" :exclusions [org.clojure/clojure]]

so pandeiro/boot-http does not depend on old clojure version anymore and boot compain dissapeared.

like image 130
Max Prokopov Avatar answered Nov 17 '22 23:11

Max Prokopov


Well the answer is pretty simple. I was missing the boot.properties file in the root folder. Just create a file with the following content:

#https://github.com/boot-clj/boot
#Sun Nov 01 16:34:27 CET 2015
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_VERSION=2.7.1
BOOT_CLOJURE_VERSION=1.8.0
like image 29
wizmer Avatar answered Nov 17 '22 23:11

wizmer