which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
Sonarqube Server
how is SonarQube deployed: zip, Docker, Helm
Zip
what are you trying to achieve
Upgrade to 2026.1
what have you tried so far to achieve this
Installed OpenJDK 21 as it was required
Heres the situation… This past week I tried to upgrade our installation thats running on a windows machine as a service to 2026.1. It gave me the error that JDK 17 was no longer supported, so i upgraded to 21…. Now the service simply stops w/o giving any log detail. I can start the app using the CLI using the StartSonar.bat file… and it brings everything up and prompts for the Database migration.. but apparantly using the SonarService.bat as a windows service in 2026.1 no longer functions properly… Any thoughts on the matter?
Update:
Tried running the command that the service is running:
D:\Services\sonarqube>java.exe -Xms8m -Xmx32m -Djava.awt.headless=true --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -cp “…\lib\sonar-application-2026.1.0.119033.jar” “org.sonar.application.App”
Error: Could not find or load main class org.sonar.application.App
Caused by: java.lang.ClassNotFoundException: org.sonar.application.App
Aand get the error..
Error: Could not find or load main class org.sonar.application.App
Caused by: java.lang.ClassNotFoundException: org.sonar.application.App
I’m sorry to read you are not able to upgrade to 2026.1.
Could you please check if you have any more interesting info in all the files from the logs folder ?
There is one log file (SonarServiceWrapper.wrapper.log) and all it shows is this:
2026-02-09 10:42:53,583 DEBUG - Starting WinSW in service mode
2026-02-09 10:42:53,614 INFO - Starting java.exe -Xms8m -Xmx32m -Djava.awt.headless=true --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -cp “…\lib\sonar-application-2026.1.0.119033.jar” “org.sonar.application.App”
2026-02-09 10:42:53,614 INFO - Started process 2972
2026-02-09 10:42:53,630 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to WinSW.IgnoreLogAppender
in the evenvwr gives an error before service shutdown where the process doesnt have permissions to view the logs… I run the java command manually and i ge tthe above error… so something’s ‘off’ the previous version works just fine.. but not this version.
Windows Server 2019
OpenJDK Runtime Environment Temurin-21.0.10+7 (build 21.0.10+7-LTS)
Microsoft SQL Server 2019 (RTM-CU32-GDR) (KB5068404) - 15.0.4455.2 (X64)
Zip install
2025.6.1.117629 works as desired, but upgrading to 2026.1.0.119033 causes the service to crash on start. Reverting resolves the issue.
sonar.log:
2026.02.11 05:45:05 INFO app[ ]\[o.s.a.AppFileSystem\] Cleaning or creating temp directory D:\\SonarQube\\temp
2026.02.11 05:45:05 INFO app[ ]\[o.s.a.es.EsSettings\] Elasticsearch listening on \[HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:{}\]
2026.02.11 05:45:05 INFO app[ ]\[o.s.a.ProcessLauncherImpl\] Launch process\[ELASTICSEARCH\] from \[D:\\SonarQube\\elasticsearch\]: C:\\Program Files\\Eclipse Adoptium\\jre-21.0.10.7-hotspot\\bin\\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=D:\\SonarQube\\elasticsearch -Des.path.conf=D:\\SonarQube\\data\\es8\\config -Des.distribution.type=tar -cp D:\\SonarQube\\elasticsearch\\lib\*;D:\\SonarQube\\elasticsearch\\lib\\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2026.02.11 05:45:05 INFO app[ ]\[o.s.a.SchedulerImpl\] Waiting for Elasticsearch to be up and running
2026.02.11 05:45:11 WARN app[ ]\[o.s.a.p.AbstractManagedProcess\] Process exited with exit value \[ElasticSearch\]: 1
2026.02.11 05:45:11 INFO app[ ]\[o.s.a.SchedulerImpl\] Process\[ElasticSearch\] is stopped
2026.02.11 05:45:11 INFO app[ ]\[o.s.a.SchedulerImpl\] SonarQube is stopped
SonarServiceWrapper.wrapper.log:
2026-02-11 05:45:03,488 DEBUG - Starting WinSW in service mode
2026-02-11 05:45:03,613 INFO - Starting java.exe -Xms8m -Xmx32m -Djava.awt.headless=true --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -cp "..\..\..\lib\sonar-application-2026.1.0.119033.jar" "org.sonar.application.App"
2026-02-11 05:45:03,691 INFO - Started process 5436
2026-02-11 05:45:03,706 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to WinSW.IgnoreLogAppender
2026-02-11 05:45:11,775 ERROR - Thread failed unexpectedly
WinSW.CommandException: Failed to open the service control manager database. Access is denied ---> System.ComponentModel.Win32Exception: Access is denied
--- End of inner exception stack trace ---
at WinSW.Native.Throw.Command.Win32Exception(String message)
at WinSW.Native.ServiceManager.Open(ServiceManagerAccess access)
at WinSW.WrapperService.SignalStopped()
at WinSW.WrapperService.<>c__DisplayClass31_0.<StartProcess>g__OnProcessCompleted|0(Process proc)
at WinSW.Util.ProcessHelper.<>c__DisplayClass6_0.<StartThread>b__0()
Tried once again today… Sonar starts up just fine when I manually call the StartSonar.bat file.. but refuses to start from the windows service running SonarService.bat…
Okay.. i think i’m on to something… i was looking at the log from when it tried to start.. and i get this:
2026-02-11 10:20:24,478 DEBUG - Starting WinSW in service mode
2026-02-11 10:20:24,493 INFO - Starting java.exe -Xms8m -Xmx32m -Djava.awt.headless=true --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -cp "..\..\..\lib\sonar-application-2026.1.0.119033.jar" "org.sonar.application.App"
2026-02-11 10:20:24,509 INFO - Started process 11204
2026-02-11 10:20:24,524 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to WinSW.IgnoreLogAppender
and from the same folder the batch file is, I tried to run that manually and got the error: Error: Could not find or load main class org.sonar.application.App
Caused by: java.lang.ClassNotFoundException: org.sonar.application.App
so I was investigating and noticed that the path was off…
2026-02-11 05:45:11,775 ERROR - Thread failed unexpectedly
WinSW.CommandException: Failed to open the service control manager database. Access is denied —> System.ComponentModel.Win32Exception: Access is denied
— End of inner exception stack trace —
at WinSW.Native.Throw.Command.Win32Exception(String message)
at WinSW.Native.ServiceManager.Open(ServiceManagerAccess access)
at WinSW.WrapperService.SignalStopped()
could indicate a permission problem. This error can show up when the service is either not installed or ran with elevated (admin) permissions. Could you try installing the SonarQube service again in a shell with admin permissions?
@Darren_McDaniel I am happy that you found a workaround the works for you. The path that we add to classpath has not changed between the version.
However indeed, there was one minor change to service starter between 2025.6 and 2026.1 that might potentially be problematic. Although I struggle to reproduce that issue you were having on your system.
If you would want to help us troubleshoot the issue, then please change inside sonarqube-2026.1.0.119033\bin\windows-x86-64\lib\SonarServiceWrapper.xml line 23 from
<executable>java.exe</executable> to <executable>JAVA_EXE</executable>
And for the record this “workaround “ only works running in the console the service still fails to start on its own because any changes to the xml are overwritten every time it starts up
I was not able to reproduce the issue reported above. I can confirm there were no significant changes to our service wrapper which is responsible for handling installation and start up of Windows service.
For future reporters of the same issue: please verify that Java on your Windows PATH points to JDK not to JRE. Also, in case you want to report similar issue please tell us your exact Java version as well as please check whether SonarQube Server launches fine with StartSonar.bat
We are using jdk-17.0.6.10-hotspot, StartSonar.bat version fails with error below. If we try to upgrade java version there is connectivity issue with SQL DB(same config that works for 17.0.x and 2025.5)
D:\sonarqube-2026.1\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 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0