SonarQube包装器在启动时出现JVM错误

时间:2018-04-06 12:52:29

标签: c++ linux sonarqube

我正在尝试设置SonarQube并测试它是如何工作的Linux。我安装了SonarQube开发者版本。我试图运行Sonar(https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-build-wrapper-linux)制作的Hello World C ++示例。

当我发布/opt/sonarqube-6.7.2/bin/linux-x86-64/wrapper /home/some_user/some_storage/sonar-scanning-examples/sonarqube-scanner-build-wrapper-linux/build.sh时。

我收到此错误:

$ /opt/sonarqube-6.7.2/bin/linux-x86-64/wrapper /home/some_user/some_storage/sonar-scanning-examples/sonarqube-scanner-build-wrapper-linux/build.sh
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
wrapper  | JVM exited while loading the application.
jvm 1    | Error: Could not find or load main class Main
wrapper  | Launching a JVM...
wrapper  | JVM exited while loading the application.
jvm 2    | Error: Could not find or load main class Main
wrapper  | Launching a JVM...
wrapper  | JVM exited while loading the application.
jvm 3    | Error: Could not find or load main class Main
wrapper  | Launching a JVM...
wrapper  | JVM exited while loading the application.
jvm 4    | Error: Could not find or load main class Main
wrapper  | Launching a JVM...
wrapper  | JVM exited while loading the application.
jvm 5    | Error: Could not find or load main class Main
wrapper  | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
wrapper  |   There may be a configuration problem: please check the logs.
wrapper  | <-- Wrapper Stopped

我也试图改变

wrapper.java.command=java

wrapper.java.command=/path/to/my/jdk/bin/java

仍然会出错。

如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

感谢Victor Gubin,我明白需要CPP包装器。

  

可以从URL http://localhost:9000/static/cpp/build-wrapper-linux-x86.zip

下载适用于Linux的Build Wrapper

更多信息:https://docs.sonarqube.org/display/PLUG/Building+on+Linux