0

I am getting the following NoClassDefFoundError exception when I am trying to run sonnar (using sonar-runner). I have followed the configuration instructions and all classpath settings are correct. Any help is appreciated!

Here's the stacktrace:

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
superEb
  • 5,613
  • 35
  • 38
user1693199
  • 39
  • 2
  • 5

1 Answers1

0

There are chances that some Logback JARs are corrupted.

You can try to delete ~/.sonar (the SonarQube local repo) and see if this works.

If it does not, your install of SonarQube may contain a corrupted JAR. In that case you'd better download SonarQube again and reinstall it.