我如何获得“蛋糕回复”?在 OSX 上工作? (我收到“线程“main”中出现异常 java.lang.NoClassDefFoundError:clojure/main”)

发布于 2024-10-05 02:03:10 字数 4198 浏览 6 评论 0原文

我正在尝试让 clojure/emacs/swank/cake 一起工作。根据 assembla 我需要 'cake repl' 来启动 repl,但我保留收到 NoClassDefFoundError。知道如何解决这个问题吗?

这是我在命令行中得到的内容:

$ cake ps
7876 main -Dcake.project=/Users/bmaddy/.cake -Xms16M -Xmx64M -Djava.library.path=lib/dev/native
$ echo $CLASSPATH

$ java -version
java version "1.5.0_26"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_26-b03-376-9M3263)
Java HotSpot(TM) Client VM (build 1.5.0_26-156, mixed mode, sharing)
$ ruby -v
ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
$ cake repl
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main
     [cake] connection to bake jvm is taking a long time...
     [cake] you can use ^C to abort and use 'cake kill' or 'cake kill -9' to force the jvm to restart
^C/Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:509:in `sleep': Interrupt
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:509:in `with_socket'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:431:in `repl'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:430:in `loop'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:430:in `repl'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:822:in `send'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:822
    from /Users/bmaddy/.gem/ruby/1.8/bin/cake:19:in `load'
    from /Users/bmaddy/.gem/ruby/1.8/bin/cake:19

$ cake ps
7876 main -Dcake.project=/Users/bmaddy/.cake -Xms16M -Xmx64M -Djava.library.path=lib/dev/native
12539 main -Dcake.project=/Users/bmaddy/Documents/books/SICP -Xms16M -Xmx64M -Djava.library.path=lib/dev/native

更多信息:

$ cake deps force
     [deps] Fetching dependencies...
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojure
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojure-snapshots
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojars
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from maven
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository clojure at http://build.clojure.org/releases
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojure (http://build.clojure.org/releases)
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository clojure-snapshots at http://build.clojure.org/snapshots
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojure-snapshots (http://build.clojure.org/snapshots)
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository clojars at http://clojars.org/repo
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojars (http://clojars.org/repo)
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository maven at http://repo1.maven.org/maven2
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository maven (http://repo1.maven.org/maven2)
     [deps] Copying 3 files to /Users/bmaddy/Documents/books/SICP/build/lib
     [deps] Deleting directory /Users/bmaddy/Documents/books/SICP/lib
     [deps] Attempting to rename dir: /Users/bmaddy/Documents/books/SICP/build/lib to /Users/bmaddy/Documents/books/SICP/lib
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/clean
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/default
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/deps
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/help
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/pom
     [deps] Restarting project jvm

I'm trying to get clojure/emacs/swank/cake all working together. According to assembla I need 'cake repl' to launch a repl, but I keep getting a NoClassDefFoundError. Any idea how to fix that?

Here's what I get in the command line:

$ cake ps
7876 main -Dcake.project=/Users/bmaddy/.cake -Xms16M -Xmx64M -Djava.library.path=lib/dev/native
$ echo $CLASSPATH

$ java -version
java version "1.5.0_26"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_26-b03-376-9M3263)
Java HotSpot(TM) Client VM (build 1.5.0_26-156, mixed mode, sharing)
$ ruby -v
ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
$ cake repl
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main
     [cake] connection to bake jvm is taking a long time...
     [cake] you can use ^C to abort and use 'cake kill' or 'cake kill -9' to force the jvm to restart
^C/Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:509:in `sleep': Interrupt
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:509:in `with_socket'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:431:in `repl'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:430:in `loop'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:430:in `repl'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:822:in `send'
    from /Users/bmaddy/.gem/ruby/1.8/gems/cake-0.5.8/bin/cake:822
    from /Users/bmaddy/.gem/ruby/1.8/bin/cake:19:in `load'
    from /Users/bmaddy/.gem/ruby/1.8/bin/cake:19

$ cake ps
7876 main -Dcake.project=/Users/bmaddy/.cake -Xms16M -Xmx64M -Djava.library.path=lib/dev/native
12539 main -Dcake.project=/Users/bmaddy/Documents/books/SICP -Xms16M -Xmx64M -Djava.library.path=lib/dev/native

More info:

$ cake deps force
     [deps] Fetching dependencies...
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojure
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojure-snapshots
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojars
[INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from maven
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository clojure at http://build.clojure.org/releases
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojure (http://build.clojure.org/releases)
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository clojure-snapshots at http://build.clojure.org/snapshots
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojure-snapshots (http://build.clojure.org/snapshots)
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository clojars at http://clojars.org/repo
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojars (http://clojars.org/repo)
Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.pom from repository maven at http://repo1.maven.org/maven2
Unable to locate resource in repository
[INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository maven (http://repo1.maven.org/maven2)
     [deps] Copying 3 files to /Users/bmaddy/Documents/books/SICP/build/lib
     [deps] Deleting directory /Users/bmaddy/Documents/books/SICP/lib
     [deps] Attempting to rename dir: /Users/bmaddy/Documents/books/SICP/build/lib to /Users/bmaddy/Documents/books/SICP/lib
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/clean
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/default
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/deps
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/help
    [clean] Deleting /Users/bmaddy/Documents/books/SICP/.cake/run/pom
     [deps] Restarting project jvm

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

赴月观长安 2024-10-12 02:03:10

事实证明这是 Clojure 和 Java 1.5 的问题。 OS X 上的修复方法是使用 /Applications/Utilities/Java Preferences.app 切换到 Java 1.6。

Turns out this was a problem with Clojure and Java 1.5. The fix on OS X was to use /Applications/Utilities/Java Preferences.app to switch to Java 1.6.

木森分化 2024-10-12 02:03:10

看起来您的默认蛋糕项目没有 clojure jar。尝试运行 Cake Deps Force。

Looks like your default cake project doesn't have the clojure jar. Try running cake deps force.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文