I'm trying to run a small Clojure web app I wrote, and I'm getting an exception from lein ring server that isn't giving me any useful information. I've googled the error and found this discussion, which suggested running lein deps :tree to route out the problem, but that's been depreciated.
Full stack trace:
Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodError: clojure.lang.RT.mapUniqueKeys([Ljava/lang/Object;)Lclojure/lang/IPersistentMap;
at clojure.lang.Util.runtimeException(Util.java:165)
at clojure.lang.Compiler.eval(Compiler.java:6476)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.load(Compiler.java:6902)
at clojure.lang.RT.loadResourceScript(RT.java:357)
at clojure.lang.RT.loadResourceScript(RT.java:348)
at clojure.lang.RT.load(RT.java:427)
at clojure.lang.RT.load(RT.java:398)
at clojure.core$load$fn__4610.invoke(core.clj:5386)
at clojure.core$load.doInvoke(core.clj:5385)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5200)
at clojure.core$load_lib.doInvoke(core.clj:5237)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$load_libs.doInvoke(core.clj:5275)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$require.doInvoke(core.clj:5352)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at monger.collection$eval698$loading__4505__auto____699.invoke(collection.clj:12)
at monger.collection$eval698.invoke(collection.clj:12)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.load(Compiler.java:6902)
at clojure.lang.RT.loadResourceScript(RT.java:357)
at clojure.lang.RT.loadResourceScript(RT.java:348)
at clojure.lang.RT.load(RT.java:427)
at clojure.lang.RT.load(RT.java:398)
at clojure.core$load$fn__4610.invoke(core.clj:5386)
at clojure.core$load.doInvoke(core.clj:5385)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5200)
at clojure.core$load_lib.doInvoke(core.clj:5237)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$load_libs.doInvoke(core.clj:5271)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$require.doInvoke(core.clj:5352)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at donebox.views.landing$eval692$loading__4505__auto____693.invoke(landing.clj:1)
at donebox.views.landing$eval692.invoke(landing.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.load(Compiler.java:6902)
at clojure.lang.RT.loadResourceScript(RT.java:357)
at clojure.lang.RT.loadResourceScript(RT.java:348)
at clojure.lang.RT.load(RT.java:427)
at clojure.lang.RT.load(RT.java:398)
at clojure.core$load$fn__4610.invoke(core.clj:5386)
at clojure.core$load.doInvoke(core.clj:5385)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5200)
at clojure.core$load_lib.doInvoke(core.clj:5237)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$load_libs.doInvoke(core.clj:5271)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:604)
at clojure.core$use.doInvoke(core.clj:5363)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at donebox.core$eval686$loading__4505__auto____687.invoke(core.clj:1)
at donebox.core$eval686.invoke(core.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.load(Compiler.java:6902)
at clojure.lang.RT.loadResourceScript(RT.java:357)
at clojure.lang.RT.loadResourceScript(RT.java:348)
at clojure.lang.RT.load(RT.java:427)
at clojure.lang.RT.load(RT.java:398)
at clojure.core$load$fn__4610.invoke(core.clj:5386)
at clojure.core$load.doInvoke(core.clj:5385)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5200)
at clojure.core$load_lib.doInvoke(core.clj:5237)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$load_libs.doInvoke(core.clj:5271)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$require.doInvoke(core.clj:5352)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at user$eval3.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6454)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$null_opt.invoke(main.clj:348)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
Caused by: java.lang.NoSuchMethodError: clojure.lang.RT.mapUniqueKeys([Ljava/lang/Object;)Lclojure/lang/IPersistentMap;
at monger.conversion$loading__4910__auto__.invoke(conversion.clj:24)
at monger.conversion__init.load(Unknown Source)
at monger.conversion__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at clojure.lang.RT.loadClassForName(RT.java:2030)
at clojure.lang.RT.load(RT.java:417)
at clojure.lang.RT.load(RT.java:398)
at clojure.core$load$fn__4610.invoke(core.clj:5386)
at clojure.core$load.doInvoke(core.clj:5385)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5200)
at clojure.core$load_lib.doInvoke(core.clj:5237)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$load_libs.doInvoke(core.clj:5271)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:604)
at clojure.core$use.doInvoke(core.clj:5363)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at monger.core$eval704$loading__4505__auto____705.invoke(core.clj:10)
at monger.core$eval704.invoke(core.clj:10)
at clojure.lang.Compiler.eval(Compiler.java:6465)
... 95 more
Subprocess failed
project.clj:
(defproject donebox "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:source-paths ["src/main/clj"]
:java-source-paths ["src/main/java"] ; Java source is stored separately.
:test-paths ["test" "src/test/clojure"]
:dependencies [[org.clojure/clojure "1.4.0"]
[ring "1.2.0-RC1"]
[ring/ring-servlet "1.2.0-RC1"]
[compojure "1.1.5"]
[hiccup "1.0.3"]
[com.novemberain/monger "1.5.0"]
[org.clojure/data.xml "0.0.7"]
[org.clojure/data.json "0.2.2"]
[clj-oauth "1.4.0"]
[clojure-twitter "1.2.5"]
[ring-anti-forgery "0.2.1"]]
:plugins [[lein-ring "0.8.5"]
[lein-cljsbuild "0.3.2"]]
:ring {:handler donebox.core/handler :init donebox.core/mongo-config :destroy donebox.core/disconnect}
:cljsbuild {
:builds [{
; The path to the top-level ClojureScript source directory:
:source-paths ["src/main/cljs"]
; The standard ClojureScript compiler options:
; (See the ClojureScript compiler documentation for details.)
:compiler {
:output-to "resources/public/js/main.js" ; default: target/cljsbuild-main.js
:optimizations :advanced
:pretty-print true}}]})
core.clj:
(ns donebox.core
(:use [compojure.core]
[donebox.views.landing]
[ring.middleware.params]
[ring.middleware.anti-forgery])
(:require [compojure.route :as route]
[compojure.handler :as handler]
[compojure.response :as response]
[monger.core :as mg])) ;; Error here.
(defroutes main-routes
(GET "/" [] (index))
(POST "/process_index" [] (handle-index))
(GET "/thankyou" [] (thankyou))
(GET "/roadmap" [] (roadmap))
(route/resources "/")
(route/not-found "Page not found"))
(def handler
(-> (handler/site main-routes)
(wrap-params)
(wrap-anti-forgery)))
(defn mongo-config []
((mg/connect-via-uri! "mongodb://<dbuser>:<dbpwd>#ds031628.mongolab.com:31628/donebox"))
(defn disconnect []
(mg/disconnect!))
Is there any information on what I can do about this exception? Thank you for your time and consideration.
That was an easy fix.
WARNING!!! possible confusing dependencies found:
[org.clojure/clojure "1.4.0"]
overrides
[com.novemberain/monger "1.5.0"] -> [org.clojure/clojure "1.5.1"]
and
[com.novemberain/monger "1.5.0"] -> [com.novemberain/validateur "1.4.0"] -> [org.clojure/clojure "1.5.1"]
and
[com.novemberain/monger "1.5.0"] -> [clojurewerkz/support "0.15.0"] -> [org.clojure/clojure "1.5.1"]
[clojure-twitter "1.2.5"] -> [com.twinql.clojure/clj-apache-http "2.3.1"] -> [org.apache.httpcomponents/httpcore "4.0.1"]
overrides
[clj-oauth "1.4.0"] -> [clj-http "0.5.3"] -> [org.apache.httpcomponents/httpclient "4.2.1"] -> [org.apache.httpcomponents/httpcore "4.2.1"]
and
[clj-oauth "1.4.0"] -> [clj-http "0.5.3"] -> [org.apache.httpcomponents/httpmime "4.2.1"] -> [org.apache.httpcomponents/httpcore "4.2.1"]
[clj-oauth "1.4.0"]
[clj-http "0.5.3"]
[cheshire "4.0.1"]
[com.fasterxml.jackson.core/jackson-core "2.0.4"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.0.4"]
[commons-codec "1.6"]
[org.apache.httpcomponents/httpclient "4.2.1"]
[org.apache.httpcomponents/httpmime "4.2.1"]
[slingshot "0.10.3"]
[clojure-complete "0.2.3"]
[clojure-twitter "1.2.5"]
[com.twinql.clojure/clj-apache-http "2.3.1"]
[commons-logging "1.1.1"]
[org.apache.httpcomponents/httpcore "4.0.1"]
[org.clojure/clojure-contrib "1.2.0"]
[com.novemberain/monger "1.5.0"]
[clojurewerkz/support "0.15.0"]
[com.google.guava/guava "14.0.1"]
[com.novemberain/validateur "1.4.0"]
[org.mongodb/mongo-java-driver "2.11.0"]
[ragtime/ragtime.core "0.3.2"]
[org.clojure/tools.cli "0.2.2"]
[compojure "1.1.5"]
[clout "1.0.1"]
[org.clojure/core.incubator "0.1.0"]
[org.clojure/tools.macro "0.1.0"]
[hiccup "1.0.3"]
[org.clojure/clojure "1.4.0"]
[org.clojure/data.json "0.2.2"]
[org.clojure/data.xml "0.0.7"]
[org.clojure/tools.nrepl "0.2.3"]
[ring-anti-forgery "0.2.1"]
[crypto-random "1.1.0"]
[ring/ring-servlet "1.2.0-RC1"]
[javax.servlet/servlet-api "2.5"]
[ring "1.2.0-RC1"]
[ring/ring-core "1.2.0-RC1"]
[clj-time "0.4.4"]
[joda-time "2.1"]
[commons-fileupload "1.3"]
[commons-io "2.4"]
[org.clojure/tools.reader "0.7.3"]
[ring/ring-codec "1.0.0"]
[ring/ring-devel "1.2.0-RC1"]
[clj-stacktrace "0.2.5"]
[ns-tracker "0.2.1"]
[org.clojure/java.classpath "0.2.0"]
[org.clojure/tools.namespace "0.1.3"]
[ring/ring-jetty-adapter "1.2.0-RC1"]
[org.eclipse.jetty/jetty-server "7.6.8.v20121106"]
[org.eclipse.jetty.orbit/javax.servlet "2.5.0.v201103041518"]
[org.eclipse.jetty/jetty-continuation "7.6.8.v20121106"]
[org.eclipse.jetty/jetty-http "7.6.8.v20121106"]
[org.eclipse.jetty/jetty-io "7.6.8.v20121106"]
[org.eclipse.jetty/jetty-util "7.6.8.v20121106"]
Related
Anyone recognize what might be the cause of this error? It's from a lein clojure project that uses datomic-pro 0.9.5372. It only shows up in my production environment. I'm still trying to reproduce in my dev environment.
Exception in thread "main" java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.maximumSize(I)Lcom/google/common/collect/MapMaker; from class datomic.datalog__init, compiling:(datomic_session.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at sonacamp.router$eval20$loading__5569__auto____21.invoke(router.clj:1)
at sonacamp.router$eval20.invokeStatic(router.clj:1)
at sonacamp.router$eval20.invoke(router.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval5$fn__7.invoke(form-init5043920914949880861.clj:1)
at user$eval5.invokeStatic(form-init5043920914949880861.clj:1)
at user$eval5.invoke(form-init5043920914949880861.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.maximumSize(I)Lcom/google/common/collect/MapMaker; from class datomic.datalog__init
at datomic.datalog__init.load(Unknown Source)
at datomic.datalog__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:703)
at datomic.query$loading__4784__auto__.invoke(query.clj:4)
at datomic.query__init.load(Unknown Source)
at datomic.query__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at datomic.api$loading__4784__auto__.invoke(api.clj:6)
at datomic.api__init.load(Unknown Source)
at datomic.api__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at datomic_session$eval3591$loading__5569__auto____3592.invoke(datomic_session.clj:1)
at datomic_session$eval3591.invokeStatic(datomic_session.clj:1)
at datomic_session$eval3591.invoke(datomic_session.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
... 70 more
It looks like you probably have a different version of google commons than datomic was compiled against. Check the output of lein deps :tree, and see if there are conflicts related to that library.
Turned out I had a very outdated dependency [datomic-session] that I forgot I was experimenting with. Removing that resolved the issue. Turned out I had the dependency installed via checkouts/.
I am trying to install and build Boost libraries on my laptop which runs Windows 8 and CodeBlocks. I am following the steps described in most of the guides that I found on web to no extent.
I downloaded boost 1.57.0 from boost.org and I extracted the library to C:/. From the root library, I run bootstrap.bat gcc and I keep obtaining a Failed to build Boost.Build engine.
The following is the content of bootstrap.log
###
### Using 'gcc' toolset.
###
c:\Boost\boost_1_57_0\tools\build\src\engine>if exist bootstrap rd /S /Q bootstrap
c:\Boost\boost_1_57_0\tools\build\src\engine>md bootstrap
c:\Boost\boost_1_57_0\tools\build\src\engine>gcc -DNT -o bootstrap\jam0.exe command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c
I cannot understand what is causing the error since the .log doesn't say anything about it. Do you have any idea?
I have added the library (green-tags) in my project.clj:
(defproject musicdb "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [
[org.clojure/clojure "1.6.0"]
[claudio "0.1.2"]
[green-tags "0.3.0-alpha"]
])
Then i ran lein deps which installed the library in /home/ls/.m2/repository
[ls#zilla musicdb]$ sudo find /home -name green-tags -print
/home/ls/.m2/repository/green-tags
/home/ls/.m2/repository/green-tags/green-tags
I still get a "filenotfound" error.
[ls#zilla musicdb]$ lein test
Exception in thread "main" java.io.FileNotFoundException: Could not locate green_tags__init.class or green_tags.clj on classpath: , compiling:(musicdb/filesystem.clj:2:52)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
at clojure.core$load_lib.doInvoke(core.clj:5485)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$load_libs.doInvoke(core.clj:5524)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$require.doInvoke(core.clj:5607)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at musicdb.core_test$eval182$loading__4958__auto____183.invoke(core_test.clj:1)
at musicdb.core_test$eval182.invoke(core_test.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6692)
at clojure.lang.Compiler.load(Compiler.java:7130)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
at clojure.core$load_lib.doInvoke(core.clj:5485)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$load_libs.doInvoke(core.clj:5524)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$require.doInvoke(core.clj:5607)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:626)
at user$eval85.invoke(form-init4450700702774542526.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
**Caused by: java.io.FileNotFoundException: Could not locate green_tags__init.class or** green_tags.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
at clojure.core$load_lib.doInvoke(core.clj:5485)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$load_libs.doInvoke(core.clj:5524)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:628)
at clojure.core$use.doInvoke(core.clj:5618)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at musicdb.filesystem$eval207.invoke(filesystem.clj:3)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 55 more
So i tried setting the classpath variable to the directory where green-tags is installed
export CLASSPATH=$CLASSPATH:/home/ls/.m2/repository
But it still cannot find the library
This is how i try to import the library in my code
(require 'green-tags)
It's
(require 'green-tags.core)
...or, if you wanted to follow convention, in your ns declaration, something like:
(ns your-code-namespace
:require [green-tags.core :as green-tags])
not
(require 'green-tags)
This is obvious when looking at the library's source, or using a tool such as unzip -l to look at the contents of the jar.
I'm trying to do unit-testing using midje, and I hit some wall.
Assuming I have this directory structure:
├── src
│ └── clj
│ └── faris
│ └── lune
│ ├── core.clj
│ ├── index
│ │ ├── comment.clj
│ │ └── place.clj
│ ├── middleware
│ └── core.clj
└── test
└── clj
└── faris
└── lune
└── middleware
└── t_core.clj
which .../faris/lune/middleware/t_core.clj contains a simple test:
(ns faris.lune.middleware.t-core
(:require [faris.lune.middleware.core :refer :all]
[midje.sweet :refer :all]))
(fact "simple test"
(+ 1 1) => 2)
It always fail with the following error message:
Exception in thread "main" java.io.FileNotFoundException: Could not locate faris/lune/middleware/t_core__init.class or faris/lune/middleware/t_core.clj on classpath: , compiling:(/tmp/form-init2527989536148890974.clj:1:90)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate faris/lune/middleware/t_core__init.class or faris/lune/middleware/t_core.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
at clojure.core$load_lib.doInvoke(core.clj:5485)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$load_libs.doInvoke(core.clj:5524)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$require.doInvoke(core.clj:5607)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at midje.repl$load_facts$fn__7983.invoke(repl.clj:206)
at midje.repl$load_facts.doInvoke(repl.clj:192)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at user$eval8046.invoke(form-init2527989536148890974.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Subprocess failed
Which is very cryptic to me, since it was like midje found the the test file, read the ns (faris.lune.middleware.t-core) and then saying it can't find it.
Any help? I must be missing something obvious.
Exception in thread "main" java.io.FileNotFoundException: Could not locate clojure/tools/logging__init.class or clojure/tools/logging.clj on classpath
Getting this error every time I run the project using.
There is a stack trace but it doesn't show whether the error is coming from my code or not ?
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:551)
at tombooth.friend_token$eval3554$loading__4910__auto____3555.invoke(friend_token.clj:1)
at tombooth.friend_token$eval3554.invoke(friend_token.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:512)
at auth_friend.handler$eval1857$loading__4910__auto____1858.invoke(handler.clj:1)
at auth_friend.handler$eval1857.invoke(handler.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
I was running the basic sample for this friend-redis-token project
Also I am running Leiningen 2.3.3 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
EDIT: Here is the project.clj
(defproject auth_friend "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "1.1.6"]
[com.cemerick/friend "0.2.0"]]
:plugins [[lein-ring "0.8.8"]]
:ring {:handler auth_friend.handler/app}
:profiles
{:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
[ring-mock "0.1.5"]]}})
initially I tried by mentioning the clojar as a dependency as given in the github page of the project and then later on I downloaded both the repositories and made them part of my project.
keeping the namespace same.
but still its giving exactly the same issue.
.
├── #auth_fri#
├── README.md
├── project.clj
├── resources
│ └── public
├── src
│ ├── auth_friend
│ │ ├── #handler.clj#
│ │ └── handler.clj
│ └── tombooth
│ ├── friend_token
│ │ ├── redis.clj
│ │ ├── token.clj
│ │ └── token_store.clj
│ └── friend_token.clj
├── target
│ ├── classes
│ └── stale
│ └── extract-native.dependencies
└── test
└── auth_friend
└── test
└── handler.clj
If you're using logging you need the dependency:
[org.clojure/tools.logging "0.2.6"]
In your project, which is missing from the dependency vector on your project file.