Linkage Error - Not able to start the SonarQube Server, everytime I try to start it using bat file

C:\Sonar_Qube\sonarqube-10.0.0.68432\bin\windows-x86-64>StartSonar.bat
Starting SonarQube…
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

C:\Sonar_Qube\sonarqube-10.0.0.68432\bin\windows-x86-64>StartSonar.bat
Starting SonarQube…
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

As noted in the Requirements documentation, Java 17 is required to start the server.

Based on the error message, you have Java 11 installed.

1 Like

Hello ,I am also getting same linkage error as stated above.Please find details below & let me know the steps which i need to follow.

when i am trying to start sonarqube server i am getting this error.

Now,please find my JDK version in below image,its 11.

.

After searching online gotsome information about above error,and to resolve above error i have installed JDK 18,after configuring this version 18,i am able to solve above error but getting this another error.

Please help me to reach out of this.

Looking forward for your support.

Regards,
Ankush.
Email-ankush.kedar@tcs.com

The supported version is Java 17, as noted in the requirements. It is not a minimum version.

Hello,
I am getting below error while executing sonar scanner command.



Please guide.
Thnak you.

Hello…
Yesterday i was able to start my sonarqube server on local host,but today i am getting this elasticsearch related error,Please help.
because of this error sonarqube server starting & stopping immediately,

Attaching Elasticsearch log file here
es.log (33.9 KB)

Thanks.

Hey there.

java.lang.IllegalStateException: failed to obtain node locks, tried [D:\Users\2014283\SonarQube\sonarqube-10.0.0.68432\sonarqube-10.0.0.68432\data\es8]; maybe these locations are not writable or multiple nodes were started on the same data path?

It seems you either have tried to start multiple SonarQube instances against the same database, or something has corrupted your data/es8 folder (you can try deleting it and restarting).

If you have an issue around scanning, please open a new thread.

Hello,

Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main 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
The SonarScanner did not complete successfully

Configured the JDK 11, because it is SonarQube 8.9 LTS version.

Where am I getting wrong, please help me to reach out of this.

Thanks

I face the same error like that :


and I installed a recent Java version

but I try to solve it with different versions like Java 8 and 11 also but it doesn’t work how to resolve

But in this doc it is mentioned that JRE is auto-provisioned for sonar cli 6.0 and above. SonarScanner requirements | SonarQube Server Documentation
Why do we still have to install it explicitly?

I too am getting same error when my latest cli tries to connect to latest sonarqube server in my old Java 11 env.

Hey @writetonikhil

There’s a few other things you have to keep in mind – like you must be using SonarQube v10.6+.

Instead of bumping this old thread, I suggest you raise a new thread with more deatils (version of SQ used, logs that show off the scanner version and the error)