RocketMQ名称服务器启动错误 - 无法找到或加载主类

时间:2017-04-30 17:37:39

标签: java maven maven-3 rocketmq

我试图在the official guide之后从头开始安装RocketMQ,我使用了jdk 1.8.0_121和maven 3.5.0。

但是,在步骤mvn -Prelease-all -DskipTests clean install -U之后,没有生成目录distribution,因此cd distribution/target/apache-rocketmq将无法成功。

然后我尝试通过输入sh bin/mqnamesrv直接启动名称服务器,它给了我以下错误。

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=320m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Error: Could not find or load main class org.apache.rocketmq.namesrv.NamesrvStartup

我原以为它可能是我的CLASSPATH环境变量的问题,但即使我设置它也仍然无效。以下是我的配置

export JAVA_HOME=$HOME/src/jdk1.8.0_121
export PATH=$PATH:$JAVA_HOME/bin
export MAVEN_HOME=$HOME/src/apache-maven-3.5.0
export PATH=$PATH:$MAVEN_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

源代码是否有更新或者文档上没有出现的额外步骤,我想知道我是否遗漏了什么?

1 个答案:

答案 0 :(得分:1)

很抱歉给您带来麻烦,请git克隆develop分支中的最新源代码,并且有一个独立的模块distribution

如果您在cd target/apache-rocketmq-all/分行,请master运行rocketmq。