Java problem with sonarqube

Hi, i have a problem with java. We are using java-17-openjdk and sonarqube developer version 9.9.0.65466. After installing the last patch for java (java-17-openjdk-17.0.9.0.9-2.el8. x86_64) sonarqube do not start. The last version of java where sonarqube start, is java-17-openjdk-17.0.7.0.7-3.el8.x86_64. Also with java-17-openjdk-17.0.8 sonarqube didn’t start. We are using zip instalation. Sonarqube is working on RHEL 8.9. So my question is if is necessary to upgrade sonarqube and which version should be installed that works with the last java-17-openjdk patch?

Hey there.

We wouldn’t expect the latest patch version of Java to cause an issue. What do the logs say?

Hello,
I had to reproduce the error:
nohup.log
Error: LinkageError occurred while loading main class org.sonar.application.App
java.lang.UnsupportedClassVersionError: org/sonar/application/App has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

This version of Java would be Java 11 – so unless OpenJDK really messed up, I don’t think that Java 17 is getting used here.

Can you try pointing the environment variable SONAR_JAVA_PATH to the java.exe file of your java-17-openjdk-17.0.9.0.9-2.el8. x86_64 install? Maybe it simply got taken off the path, and is defaulting to Java 11.

hmm, I really have both versions installed, but it’s interesting that it works when I downgrade v17 and and v11 remain untouchable. Ok I will try another way - I will uninstall v11.
And till now works without a problem.

Hi,
yes it helped. I removed java v11 and upgraded v17 to the latest version and it works without a problem. Apparently there was some kind of mismatch with the paths.
I appreciate your help, thank you

1 Like