无法找到或加载主类org.apache.zookeeper.server.quorum.QuorumPeerMain [英] Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain

查看:26973
本文介绍了无法找到或加载主类org.apache.zookeeper.server.quorum.QuorumPeerMain的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过教程apache的卡夫卡运行(Apache的卡夫卡网站),必须使用一个辅助教程(的 HTTP://janschulte.word$p$pss.com/2013/10/13/apache-kafka-0-8-在窗口/ ),并找到另一个答案(从我在VMware中运行的Ubuntu时,卡夫卡VM无法识别选项'+ UseCom pressedOops'搜索)只是为了在这里。

I'm running through the tutorial for apache kafka (on the apache kafka website) and had to use a helper tutorial (http://janschulte.wordpress.com/2013/10/13/apache-kafka-0-8-on-windows/) and find another answer (search "Unrecognized VM option '+UseCompressedOops' when running kafka from my ubuntu in VMware") just to make it here.

现在,我遇到错误:

无法找到或加载主类
  org.apache.zookeeper.server.quorum.QuorumPeerMain的时候
  跑步:斌/ zookeeper-server-start.sh配置/ zookeeper.properties

Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain" when running:"bin/zookeeper-server-start.sh config/zookeeper.properties

我以前做过一些搜索,发现了一个电子邮件链没有一个明确的答案和其他解决方案,但对于不同的版本(<一个href=\"https://www.marshut.net/kiisyx/apache-kafka-error-on-windows-couldnot-find-or-load-main-class-quorumpeermain.html\" rel=\"nofollow\">https://www.marshut.net/kiisyx/apache-kafka-error-on-windows-couldnot-find-or-load-main-class-quorumpeermain.html)

I did some searching before and found an email chain without a definitive answer and other solutions but for different versions (https://www.marshut.net/kiisyx/apache-kafka-error-on-windows-couldnot-find-or-load-main-class-quorumpeermain.html)

PS:我会在括号内的所有链接,但我的名声还没有准备好

PS: I would have links in all parenthesis but my reputation isn't ready yet.

推荐答案

也许你的类路径制造麻烦。错误说,它可能无法加载QuorumPeerMain类。这个类将在zookeeper-(版本)的.jar。确保罐子可在libs文件夹,并确保您所指出的lib文件夹中的类路径中。显然,类路径指向的bin / kafka-run-class.sh。在年底kafka-run-class.sh你会发现一个行

Probably your class path is making trouble. The error says it could not able to load the QuorumPeerMain class. This class will be available at zookeeper-(version).jar. Make sure the jar is available at libs folder and also make sure that you have pointed lib folder in the classpath. Obviously the class path is pointed in the bin/kafka-run-class.sh. In the kafka-run-class.sh at the end you will find a line

if [ "x$DAEMON_MODE" = "xtrue" ]; then

上面的行之前添加一条语句 回声$ CLASSPATH 。现在尝试启动。所以,你可以查找字符串传递到classpath中。它应该包含:./../库/ zookeeper-(版本)的.jar: lib文件夹中找到的版本应该匹配的字符串。默认情况下它会很好地工作。我觉得有些已更改下载的文件。如果这样,那么这无疑将会开始。

add a statement echo $CLASSPATH before the above line. Now try to start. So that you can find what string is passing to the classpath. It should contain :./../libs/zookeeper-(version).jar: The version found in the lib folder should match with the string. By default it will work perfectly. I think some one has changed your downloaded file. If it so then surely it will start.

或尝试在下面的链接中的步骤prescribed,它为我工作

or try the steps prescribed in the below link, It worked for me

http://kafka.apache.org/07/quickstart.html

http://kafka.apache.org/07/quickstart.html

这篇关于无法找到或加载主类org.apache.zookeeper.server.quorum.QuorumPeerMain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆