在sonar-runner上获取NoClassDefFoundError

时间:2013-09-12 13:46:29

标签: sonarqube sonar-runner

当我尝试运行sonnar(使用声纳 - 跑步者)时,我收到以下NoClassDefFoundError异常。我已按照配置说明进行操作,所有类路径设置均正确无误。任何帮助表示赞赏!

这是堆栈跟踪:

Exception in thread "main" java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getMethod0(Class.java:2670)
    at java.lang.Class.getMethod(Class.java:1603)
    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:85)
    at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
    at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
    at org.sonar.runner.api.Runner.execute(Runner.java:90)
    at org.sonar.runner.Main.executeTask(Main.java:70)
    at org.sonar.runner.Main.execute(Main.java:59)
    at org.sonar.runner.Main.main(Main.java:41)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException
    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 org.sonar.runner.impl.IsolatedClassloader.loadClass(IsolatedClassloader.java:94)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 14 more

1 个答案:

答案 0 :(得分:0)

有些Logback JAR可能已损坏。

您可以尝试删除~/.sonar(SonarQube本地存储库)并查看是否有效。

如果没有,您的SonarQube安装可能包含损坏的JAR。在这种情况下,您最好再次下载SonarQube并重新安装。