SonarQube 8.1 - Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor

We just updated our SonarQube server from 8.0 to 8.1 and our scanning is now not working.

  • SonarQube version: 8.1.0.31237
  • Sonar Maven Scanner Version: 3.7.0.1746

We’ve had this in place for a couple years now, the only thing that we changed was upgraded our SonarQube server. We’re getting the error: Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor

With stack trace:

 java.lang.NullPointerException: null
230 	at org.sonar.java.model.JSema.resolvePackageAnnotations(JSema.java:152)
231 	at org.sonar.java.model.JSymbol.metadata(JSymbol.java:308)
232 	at org.sonar.java.se.NullableAnnotationUtils.lambda$valuesForGlobalAnnotation$4(NullableAnnotationUtils.java:217)
233 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
234 	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
235 	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
236 	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
237 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
238 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
239 	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
240 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
241 	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
242 	at org.sonar.java.se.NullableAnnotationUtils.valuesForGlobalAnnotation(NullableAnnotationUtils.java:219)
243 	at org.sonar.java.se.NullableAnnotationUtils.nonNullAnnotationOnParameters(NullableAnnotationUtils.java:204)
244 	at org.sonar.java.se.NullableAnnotationUtils.isGloballyAnnotatedParameterNonNull(NullableAnnotationUtils.java:199)
245 	at org.sonar.java.se.ExplodedGraphWalker.startingStates(ExplodedGraphWalker.java:347)
246 	at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:237)
247 	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:216)
248 	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:208)
249 	at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:77)
250 	at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:63)
251 	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:103)
252 	at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
253 	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
254 	at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
255 	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
256 	at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:86)
257 	at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:72)
258 	at org.sonar.java.se.SymbolicExecutionVisitor.scanFile(SymbolicExecutionVisitor.java:53)
259 	at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:142)
260 	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:133)
261 	at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:99)
262 	at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:65)
263 	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:111)
264 	at org.sonar.java.JavaSquid.scan(JavaSquid.java:105)
265 	at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:88)
266 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
267 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
268 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
269 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
270 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
271 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
272 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
273 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
274 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
275 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
276 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
277 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
278 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
279 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
280 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
281 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
282 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
283 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
284 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
285 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
286 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
287 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
288 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
289 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
290 	at com.sun.proxy.$Proxy25.execute(Unknown Source)
291 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
292 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
293 	at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65)
294 	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:104)
295 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
296 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
297 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
298 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
299 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
300 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
301 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
302 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
303 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
304 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
305 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
306 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
307 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
308 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
309 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
310 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
311 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
312 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
313 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
314 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
315 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
316 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

We execute the Sonar scan from our Jenkins build server (Linux). I’ve also tried this on my local machine (Windows) and am getting the same issue. I’ve tried both Java 8 and Java 11 environments with the same results, using Oracle JDK and OpenJDK. We execute with maven like:

mvn clean compile sonar:sonar

Is there something to try that would resolve this? Or should I downgrade our SonarQube server?

Hi,

Welcome to the community!

Thanks for providing the full stacktrace. Could you also give the full first line and last few lines before it?

 
Thx,
Ann

Here’s the full Sonar execution from Maven. The same error repeats tons of time, I’ve just included the first 2 times:

6642 [INFO] --- sonar-maven-plugin:3.7.0.1746:sonar (default-cli) @ protech ---
6647 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.pom
6659 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.pom (3.0 kB at 247 kB/s)
6664 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.pom
6674 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.pom (5.3 kB at 534 kB/s)
6679 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.14.0.2002/sonar-scanner-api-2.14.0.2002.pom
6696 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.14.0.2002/sonar-scanner-api-2.14.0.2002.pom (5.2 kB at 304 kB/s)
6707 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api-parent/2.14.0.2002/sonar-scanner-api-parent-2.14.0.2002.pom
6726 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api-parent/2.14.0.2002/sonar-scanner-api-parent-2.14.0.2002.pom (4.8 kB at 251 kB/s)
6733 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
6735 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar
6745 [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.14.0.2002/sonar-scanner-api-2.14.0.2002.jar
6765 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar (28 kB at 866 kB/s)
6852 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar (262 kB at 2.2 MB/s)
6898 [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.14.0.2002/sonar-scanner-api-2.14.0.2002.jar (625 kB at 3.8 MB/s)
7099 [INFO] User cache: /root/.sonar/cache
7449 [INFO] SonarQube version: 8.1.0
7491 [INFO] Default locale: "en", source code encoding: "UTF-8"
8025 [INFO] Load global settings
8136 [INFO] Load global settings (done) | time=112ms
8140 [INFO] Server id: 99433182-AWT8w4UNY7k0FWtr0JwD
8150 [INFO] User cache: /root/.sonar/cache
8155 [INFO] Load/download plugins
8155 [INFO] Load plugins index
8239 [INFO] Load plugins index (done) | time=84ms
10003 [INFO] Load/download plugins (done) | time=1848ms
10704 [INFO] Process project properties
10719 [INFO] Process project properties (done) | time=14ms
10721 [INFO] Execute project builders
10728 [INFO] Execute project builders (done) | time=7ms
10734 [INFO] Project key: com.assaabloy:protech
10736 [INFO] Base dir: /builds/aa-bts/protech
10738 [INFO] Working dir: /builds/aa-bts/protech/target/sonar
10753 [INFO] Load project settings for component key: 'com.assaabloy:protech'
10783 [INFO] Load project settings for component key: 'com.assaabloy:protech' (done) | time=29ms
10909 [INFO] Load quality profiles
10971 [INFO] Load quality profiles (done) | time=62ms
10980 [INFO] Detected Gitlab CI
10988 [INFO] Load active rules
11694 [INFO] Load active rules (done) | time=706ms
11785 [INFO] Indexing files...
11787 [INFO] Project configuration:
14239 [INFO] Load project repositories
14322 [INFO] Load project repositories (done) | time=83ms
15906 [INFO] 6361 files indexed
15906 [INFO] 0 files ignored because of scm ignore settings
15913 [INFO] Quality profile for css: BTS
15916 [INFO] Quality profile for java: BTS
15916 [INFO] Quality profile for js: Sonar way Recommended
15917 [INFO] Quality profile for jsp: Sonar way
15917 [INFO] Quality profile for web: BTS
15917 [INFO] Quality profile for xml: BTS
15917 [INFO] ------------- Run sensors on module PRO-TECH TITAN
16047 [INFO] Load metrics repository
16075 [INFO] Load metrics repository (done) | time=28ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/root/.sonar/cache/a2b6a8802525720c8af2ca4fa85a2513/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
17852 [INFO] Sensor JavaSquidSensor [java]
18401 [INFO] Configured Java source version (sonar.java.source): 8
18409 [INFO] JavaClasspath initialization
18427 [INFO] JavaClasspath initialization (done) | time=18ms
18428 [INFO] JavaTestClasspath initialization
18503 [INFO] JavaTestClasspath initialization (done) | time=75ms
18680 [INFO] Java Main Files AST scan
18699 [INFO] 2634 source files to be analyzed
20385 [ERROR] Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor -  on file 'src/main/java/com/assaabloy/protech/server/dto/report/ReportPrepCostDto.java', To help improve SonarJava, please report this problem to SonarSource : see https://www.sonarqube.org/community/
java.lang.NullPointerException: null
	at org.sonar.java.model.JSema.resolvePackageAnnotations(JSema.java:152)
	at org.sonar.java.model.JSymbol.metadata(JSymbol.java:308)
	at org.sonar.java.se.NullableAnnotationUtils.lambda$valuesForGlobalAnnotation$4(NullableAnnotationUtils.java:217)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
	at org.sonar.java.se.NullableAnnotationUtils.valuesForGlobalAnnotation(NullableAnnotationUtils.java:219)
	at org.sonar.java.se.NullableAnnotationUtils.nonNullAnnotationOnParameters(NullableAnnotationUtils.java:204)
	at org.sonar.java.se.NullableAnnotationUtils.isGloballyAnnotatedParameterNonNull(NullableAnnotationUtils.java:199)
	at org.sonar.java.se.ExplodedGraphWalker.startingStates(ExplodedGraphWalker.java:347)
	at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:237)
	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:216)
	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:208)
	at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:77)
	at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:63)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:103)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:86)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:72)
	at org.sonar.java.se.SymbolicExecutionVisitor.scanFile(SymbolicExecutionVisitor.java:53)
	at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:142)
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:133)
	at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:99)
	at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:65)
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:111)
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:105)
	at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:88)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	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.$Proxy25.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.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65)
	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:104)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
	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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

21791 [ERROR] Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor -  on file 'src/main/java/com/assaabloy/protech/server/export/converter/HardwareAutosizeRuleConverter.java', To help improve SonarJava, please report this problem to SonarSource : see https://www.sonarqube.org/community/
java.lang.NullPointerException: null
	at org.sonar.java.model.JSema.resolvePackageAnnotations(JSema.java:152)
	at org.sonar.java.model.JSymbol.metadata(JSymbol.java:308)
	at org.sonar.java.se.NullableAnnotationUtils.lambda$valuesForGlobalAnnotation$4(NullableAnnotationUtils.java:217)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
	at org.sonar.java.se.NullableAnnotationUtils.valuesForGlobalAnnotation(NullableAnnotationUtils.java:219)
	at org.sonar.java.se.NullableAnnotationUtils.nonNullAnnotationOnParameters(NullableAnnotationUtils.java:204)
	at org.sonar.java.se.NullableAnnotationUtils.isGloballyAnnotatedParameterNonNull(NullableAnnotationUtils.java:199)
	at org.sonar.java.se.ExplodedGraphWalker.startingStates(ExplodedGraphWalker.java:347)
	at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:237)
	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:216)
	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:208)
	at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:77)
	at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:63)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:103)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:86)
	at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:72)
	at org.sonar.java.se.SymbolicExecutionVisitor.scanFile(SymbolicExecutionVisitor.java:53)
	at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:142)
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:133)
	at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:99)
	at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:65)
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:111)
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:105)
	at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:88)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	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.$Proxy25.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.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65)
	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:104)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
	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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

I guess I should also mention I updated the SonarQube server from 8.0 to 8.1 and the SonarJava plugin from 5.x (can’t remember which version, but probably the latest 5.x) to 6.0.

1 Like

We ended up downgrading SonaJava to 5.14 which fixed our issue. Seems there’s already a FIXME comment in SonarJava with our issue:

Hi @Austin_DeRosso,
we are currently facing the same issue after updating to 8.1.
How did you downgrade? Just installed 8.0 without restoring a previous database version?

We just downgraded the SonarJava plugin. We left the server at 8.1. To downgrade the plugin, you install it manually: https://docs.sonarqube.org/latest/setup/install-plugin/

With this: https://binaries.sonarsource.com/Distribution/sonar-java-plugin/sonar-java-plugin-5.14.0.18788.jar

All you have to do is replace the sonar-java jar in $SONARQUBE_HOME/extensions/plugins with the one linked above and then restart the server.

Thanks a lot @Austin_DeRosso, that “fixed” the issue.

Hello @Austin_DeRosso & @jvlivonius,

First, thank you for reaching out and for the feedback. As you rightfully following the stacktrace directly to the “FIXME” in SonarJava code, you can see that we were a bit anticipating the case. Unfortunately, we never managed to produce a case which would trigger it on our test projects… And so we released 6.0 (and 6.0.1) without fixing it.

Could you maybe provide us a small project, self contained (or anonymized) reproducer? It would allow us to identifies what causes the binary type to be NULL, and therefore effectively fix it.

Thanks,
Michael

@Michael I’m not sure I have an isolated reproducible example. We have around 20 projects in our SonarQube server. As soon as we updated the SonarJava scanner, all of them started to fail, it didn’t seem like it was related to specific source code.

I will try and update the SonarJava scanner again with 6.0.1 and see if I can reproduce. Assuming I can get the failure on a small project, what would you like to see? The source code to the project? Also, are there any logs or information from the SonarQube server that you would need to see as well?

I doubt 6.0.1 will fix the issue, as it mainly handled different things. Probably the logs won’t tell us more that what is currently displayed on the reported stacktrace.

What could help, however, would be to send us a small extract including a few files of one project which are making analysis fail. We need to find the pattern(s) which prevent our semantic to be fully resolved. You can send them privately to me for analysis. Knowing the java version you are using to build/analyze could help as well.

So dumb question, how do I contact you privately?

I’m not necessarily sure it has anything to do with the specific source file. This shows failures on simple DTO/POJO classes.