java.lang.NoClassDefFoundError
datoujiejie opened this issue · 3 comments
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
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:100)
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:53)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/rules/Violation
at org.sonar.plugins.objectivec.violations.OCLintXMLStreamHandler.recordViolation(OCLintXMLStreamHandler.java:91)
at org.sonar.plugins.objectivec.violations.OCLintXMLStreamHandler.collectFileViolations(OCLintXMLStreamHandler.java:84)
at org.sonar.plugins.objectivec.violations.OCLintXMLStreamHandler.collectViolationsFor(OCLintXMLStreamHandler.java:69)
at org.sonar.plugins.objectivec.violations.OCLintXMLStreamHandler.stream(OCLintXMLStreamHandler.java:56)
at org.sonar.api.utils.StaxParser.parse(StaxParser.java:113)
at org.sonar.api.utils.StaxParser.parse(StaxParser.java:93)
at org.sonar.plugins.objectivec.violations.OCLintParser.parseReport(OCLintParser.java:65)
at org.sonar.plugins.objectivec.violations.OCLintParser.parseReport(OCLintParser.java:50)
at org.sonar.plugins.objectivec.violations.OCLintSensor.parseReportIn(OCLintSensor.java:76)
at org.sonar.plugins.objectivec.violations.OCLintSensor.analyse(OCLintSensor.java:58)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:98)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:258)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:253)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:243)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
at org.sonar.batch.bootstrap.GlobalContainer.executeAnalysis(GlobalContainer.java:153)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:110)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:76)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: java.lang.ClassNotFoundException: org.sonar.api.rules.Violation
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 39 more
I've expired same problem when I use SonarQube 5.2.
When I use SonarQube 4.5.6 I don't have this issue. So as I understand org/sonar/api/rules/Violation was removed in new SQ version. At least I can't find it here
Thank you.
SonarQube 4.5.6 is OK.
Same problem, and I can't downgrade SonarQube, so I'm stuck here.