lein repl中的错误(需要帮助调试jvm stacktrace)

时间:2013-04-03 05:10:34

标签: clojure

每当我尝试启动我的repl时,我都会收到以下错误 -

 ➜  mashup git:(dev) ✗ lein repl
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.ClassNotFoundException: org.mortbay.log.Logger
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:188)
    at ring.util.serve$eval11483$loading__4784__auto____11484.invoke(serve.clj:1)
    at ring.util.serve$eval11483.invoke(serve.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6511)
    at clojure.lang.Compiler.eval(Compiler.java:6501)
    at clojure.lang.Compiler.load(Compiler.java:6952)
    at clojure.lang.RT.loadResourceScript(RT.java:359)
    at clojure.lang.RT.loadResourceScript(RT.java:350)
    at clojure.lang.RT.load(RT.java:429)
    at clojure.lang.RT.load(RT.java:400)
    at clojure.core$load$fn__4890.invoke(core.clj:5415)
    at clojure.core$load.doInvoke(core.clj:5414)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5227)
    at clojure.core$load_lib.doInvoke(core.clj:5264)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:603)
    at clojure.core$load_libs.doInvoke(core.clj:5298)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:605)
    at clojure.core$use.doInvoke(core.clj:5392)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at user$eval11479.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:6511)
    at clojure.lang.Compiler.eval(Compiler.java:6500)
    at clojure.lang.Compiler.eval(Compiler.java:6500)
    at clojure.lang.Compiler.eval(Compiler.java:6501)
    at clojure.lang.Compiler.eval(Compiler.java:6477)
    at clojure.core$eval.invoke(core.clj:2797)
    at clojure.main$eval_opt.invoke(main.clj:297)
    at clojure.main$initialize.invoke(main.clj:316)
    at clojure.main$null_opt.invoke(main.clj:349)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
REPL server launch timed out.

这并没有给我任何关于错误或缺失的迹象。关于我能做些什么来发光的任何想法?

修改

请求JVM的目录列表

ls /usr/lib/jvm/java-7-openjdk-i386/lib 
ct.sym  dt.jar  ir.idl  jconsole.jar  jexec  orb.idl  sa-jdi.jar  tools.jar

编辑 - project.clj

(defproject mashup "0.1.0"
  :description "Mashup Generator"
  :url "http://github.com/murtaza52/mashup"
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [compojure "1.1.5" :exclusions [[commons-io] [ring/ring-core] org.clojure/tools.macro]]
                 [clj-oauth "1.4.0"]
                 [org.apache.httpcomponents/httpclient "4.2.3"]
                 [org.thnetos/cd-client "0.3.4" :exclusions [[org.clojure/clojure] clj-http cheshire commons-codec]]
                 [ring/ring-core "1.2.0-beta1"]
                 [twitter-api "0.7.2" :exclusions [[org.apache.httpcomponents/httpclient] [org.apache.httpcomponents/httpmime]]]
                 [tentacles "0.2.4" :exclusions [[cheshire] clj-http]]
                 [webfui "0.2.1"]
                 [clj-time "0.4.4"]
                 [shoreleave "0.3.0"]
                 [shoreleave/shoreleave-remote-ring "0.3.0"]
                 [shoreleave/shoreleave-remote "0.3.0"]
                 [domina "1.0.1"]
                 [org.clojure/google-closure-library-third-party "0.0-2029"]
                 [org.slf4j/slf4j-log4j12 "1.7.3"]]
  :plugins [[lein-ring "0.8.3" :exclusions [org.clojure/clojure]]
            [lein-cljsbuild "0.3.0" :exclusions [org.clojure/clojure]]
            [lein-midje "3.0.0"]
            [lein-marginalia "0.7.1"]]
  :ring {:handler mashup.handler/app}
  :repl-options {:init-ns mashup.handler
                 :init (do
                         (use 'ring.util.serve)
                         (serve app))}
  :profiles {:dev {:dependencies [[ring-mock "0.1.3"]
                                  [ring-serve "0.1.2" :exclusions [[ring/ring-devel] [ring/ring-jetty-adapter]]]
                                  [midje "1.5.0" :exclusions [joda-time]]
                                  [marginalia "0.7.1" :exclusions [org.clojure/tools.namespace]]]}}
  :cljsbuild {
              :builds
              [{:source-paths ["src-cljs"],
                :compiler
                {:pretty-print true,
                 :output-to "resources/public/js/cljs.js",
                 :optimizations :whitespace}}],
              :repl-listen-port 9000})

代码位于网址 - https://github.com/murtaza52/mashup

2 个答案:

答案 0 :(得分:2)

新的堆栈跟踪表明您缺少Jetty库(org.mortbay.*通常是Jetty 6.x),这是一个问题,因为ring-serve尝试启动开发Jetty服务器。 ring-jetty-adapter库将Jetty作为依赖项引入;删除此排除应该让你直截了当。

答案 1 :(得分:1)

:init密钥的:repl-options看起来非常可疑,考虑到您之前粘贴的堆栈跟踪(您已经编辑了堆栈跟踪 - 那里有什么交易?)。它如何(serve app)没有引用 {/ 1>}生活在哪里?