我正在尝试运行我编写的一个小型 Clojure Web 应用程序,但我从 lein ring 服务器得到一个异常,它没有给我任何有用的信息。我用谷歌搜索了这个错误并发现了这个讨论,它建议运行lein deps :tree
以解决问题,但这已经被贬值了。
完整的堆栈跟踪:
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
项目.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}}]})
核心.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!))
有没有关于我可以对此异常做些什么的信息?感谢您的时间和考虑。