Exception logged in Sonar Scanner

  • SonarQube Enterprise Edition v10.5.1 (90531)
  • SonarScanner - sonar-maven-plugin:4.0.0.4121
  • Deployment : ZIP
  • Running sonar scanner using maven

Two Exceptions are getting logged.
Any specific reason for this exception?

  • First Exception
[ERROR] 10:45:28.127 Unable to run check class org.sonar.java.checks.MissingPathVariableAnnotationCheck - S6856 on file 'server/SecurityIntegration/src/main/java/com/ztech/zqube/security/integration/controller/ServerUIController.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
java.lang.ClassCastException: class java.lang.Object cannot be cast to class java.lang.String (java.lang.Object and java.lang.String are in module java.base of loader 'bootstrap')
	at org.sonar.java.checks.MissingPathVariableAnnotationCheck.lambda$arrayOrString$18(MissingPathVariableAnnotationCheck.java:186)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
  • Second Exception
[ERROR] 10:45:44.352 Unable to run check class org.sonar.java.checks.MissingPathVariableAnnotationCheck - S6856 on file 'server/SecurityService/src/main/java/com/ztech/zqube/security/service/oauth/controllers/OauthUIController.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
	at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
	at java.base/java.util.regex.Matcher.reset(Matcher.java:415)
	at java.base/java.util.regex.Matcher.<init>(Matcher.java:252)
[sonarqubelog.txt|attachment](upload://1nzMFFjI61ZrkADaQ7fuPfICwQZ.txt) (18.6 KB)

Above exceptions are getting logged for multiple files.

Hi,

Welcome to the community and thanks for this report!

First, I’m not sure it will have an impact, but SonarQube 10.7 has been released. Can you upgrade and see if this is still replicable?

And if it is, can we have the full stacktraces?

 
Thx,
Ann