javamachr / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
125 stars 24 forks source link

SonarQube 9.9 LTS issue when executing branch-scan #33

Closed nils2504 closed 1 year ago

nils2504 commented 1 year ago

Hi there,

I am facing an issue when running the scan with the branch-flag. I am using the latest plugin version 5.4.0. sonar-scanner -Dsonar.branch.name=${CI_COMMIT_BRANCH}

Error

18:49:03.739 ERROR: Error during SonarScanner execution java.lang.NoClassDefFoundError: org/sonar/scanner/scan/branch/ProjectPullRequestsLoader at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:904) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at com.github.mc1arke.sonarqube.plugin.CommunityBranchPlugin.define(CommunityBranchPlugin.java:158) at com.github.mc1arke.sonarqube.plugin.CommunityBranchPluginBootstrap.define(CommunityBranchPluginBootstrap.java:72) at org.sonar.scanner.bootstrap.ExtensionInstaller.install(ExtensionInstaller.java:57) at org.sonar.scanner.scan.SpringProjectScanContainer.addScannerExtensions(SpringProjectScanContainer.java:327) at org.sonar.scanner.scan.SpringProjectScanContainer.doBeforeStart(SpringProjectScanContainer.java:156) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:186) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167) at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138) at org.sonarsource.scanner.cli.Main.execute(Main.java:112) at org.sonarsource.scanner.cli.Main.execute(Main.java:75) at org.sonarsource.scanner.cli.Main.main(Main.java:61) Caused by: java.lang.ClassNotFoundException: org.sonar.scanner.scan.branch.ProjectPullRequestsLoader at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:904) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 35 more