SonarQube not compatible with java 14

  • versions used: SonarQube Community Edition version 8.5.1 (build 38104)
  • error observed:
  1. Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor
    Error:
    “Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor on file ’ “path_to”/“file_name”.java ’ To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/ [0m[91mjava.lang.NullPointerException: null at java.base/java.util.Objects.requireNonNull(Objects.java:222) at org.sonar.java.collections.AVLTree.get(AVLTree.java:76”

  2. Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor
    Error:
    org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException[0m[91m [0m[91mStatus ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException [0m[91mUnable to run check class org.sonar.java.se.SymbolicExecutionVisitor - on file ’ “path_to”/“file_name”.java ',

  • potential workaround - consider SonarQube compatibility with java14

Hi,

Welcome to the community!

We don’t support non-LTS versions of Java. Java 11 is the current LTS version of Java & it’s the latest version we support, as documented here.

 
HTH,
Ann

Hi Pavel,

The SonarQube server support only LTS versions of Java (currently Java 11). But the code analyzers should be able to run with any Java version >= 11 (when you use a recent scanner).
In your case, the java analyzer raises an exception, but we don’t know on which java code. I’m able with SonarQube 8.5.1, to analyze a project targeting java 14 using maven-3.6 sonar:sonar and AdoptOpenJDK 14.0.2 without error.
Could you try to share a small reproducer of code that produces this NullPointerException?
Do you face the same error using SonarQube 8.7.0.41497?