0

当我启动 Cassandra CLI 并设置好主机/端口时,每当我尝试输入任何内容(甚至是帮助或退出)时,都会出现以下错误:

Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/RecognizerSharedState
        at org.apache.cassandra.cli.CliLexer.<init>(CliLexer.java:159)
        at org.apache.cassandra.cli.CliCompiler.compileQuery(CliCompiler.java:73)
        at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:198)
        at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220)
        at org.apache.cassandra.cli.CliMain.main(CliMain.java:348)
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognizerSharedState
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

在我看来,Antlr 有问题,但我在这方面没有任何经验。我很确定我的 Cassandra 戒指也可以正常运行。有谁知道怎么回事?

提前致谢。

4

2 回答 2

0

Turns out the reason was that I wasn't using the newest version of antlr (3.2 as of right now). Thanks anyways!

于 2012-07-12T16:06:52.640 回答
0

您是从源代码签出、二进制 tarball 还是打包安装运行的?我怀疑没有正确设置类路径,或者尚未获取所有依赖项(如果您从源代码运行)。

于 2012-06-23T05:02:34.117 回答