Sonarlint for Eclipse 10.1.0, backend initialization failed

Hi,

running on Windows 10, Eclipse 2023-06.
After updating to SLE 10.1.0 and restarting Eclipse i got this error

Initializing SonarLint backend...
SonarLint Core Jar archive located at C:\Program Files\Eclipse\2023-06\..\..\..\ProgramData\Eclipse\2023-06\plugins\org.sonarlint.eclipse.sloop.windows.x64_10.1.0.81817\sloop\lib\sonarlint-core-10.1.0.77731.jar
Sloop located in C:\Program Files\Eclipse\2023-06\..\..\..\ProgramData\Eclipse\2023-06\plugins\org.sonarlint.eclipse.sloop.windows.x64_10.1.0.81817\sloop
Using JRE from C:\Program Files\Eclipse\2023-06\..\..\..\ProgramData\Eclipse\2023-06\plugins\org.sonarlint.eclipse.sloop.windows.x64_10.1.0.81817\sloop\jre
Unable to start the SonarLint backend
 
java.io.IOException: Cannot run program "C:\ProgramData\Eclipse\2023-06\plugins\org.sonarlint.eclipse.sloop.windows.x64_10.1.0.81817\sloop\jre\bin\java.exe" (in directory "C:\Program Files\Eclipse\2023-06\..\..\..\ProgramData\Eclipse\2023-06\plugins\org.sonarlint.eclipse.sloop.windows.x64_10.1.0.81817\sloop\jre\bin"): CreateProcess error=1260, Dieses Programm wurde durch eine Gruppenrichtlinie geblockt. Wenden Sie sich an den Systemadministrator, um weitere Informationen zu erhalten
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.sonarsource.sonarlint.core.rpc.client.SloopLauncher.execute(SloopLauncher.java:102)
    at org.sonarsource.sonarlint.core.rpc.client.SloopLauncher.start(SloopLauncher.java:63)
    at org.sonarlint.eclipse.core.internal.backend.SonarLintBackendService$1.run(SonarLintBackendService.java:155)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.io.IOException: CreateProcess error=1260, Dieses Programm wurde durch eine Gruppenrichtlinie geblockt. Wenden Sie sich an den Systemadministrator, um weitere Informationen zu erhalten
    at java.base/java.lang.ProcessImpl.create(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:499)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 5 more
 
Starting SonarLint for Eclipse 10.1.0.81817

Eclipse is installed here:
Eclipse itself under C:\Program Files\Eclipse\2023-06
Plugins under C:\Program Data\Eclipse\2023-06
Workspace(s) under C:\WKS

The new SLE version brings his own JRE and it is blocked by a group policy.
Now the solution would be to tell Sonarlint it should use another JRE/JDK as mentioned here

but it doesn’t work, did uninstall / install several times

k2SnJ9Cz13YnKWTd

tried to reach the Sonarlint preference page but

then it shows

Is the preference page also affected by the group policy ?
Is there a possible workaround like settting the Sonarlint JRE/JDK via eclipse.ini ?

Gilbert

When installing Sonarlint 10.1.0 on my local machine with Eclipse 2024-03, all is fine

After all, what’s the reason to make Sonarlint for Eclipse provide it’s own JRE, when
Eclipse ships with builtin JRE 17 since version 2021-12 ?!

1 Like

Hey @Rebse,

the SonarLint preference page shouldn’t be affected by the Group Policy, but I noticed that when generating the page, we assume the backend was started successfully due to us making calls to it.
This is of course incorrect and if created a ticket for that HERE that I tackle until the next release next week.

Currently, nothing for SonarLint can be configured inside the eclipse.ini file, but the Jira ticket features a tiny workaround that you just have to change, in order to test it with SLE 10.1 while I’m working on the fix.

I sadly cannot reproduce the issue myself with the group policy (no Windows) but I understand the pain. I’m looking into changing the behavior to maybe use the Java runtime provided to Eclipse if nothing is configured before we fall back to the one bundled with SonarLint. Upside is also less configuration for power users.
The reason for having SLE bundled with a JRE is that we still want to support Eclipse versions and Eclipse-based IDEs out of the box that are running on Java 11.

If you have any questions or improvement suggestions, please let me know.

Best,
Tobias

1 Like

Servus Tobias,

Thanks for looking into it.
IMO you are doing yourself unnecessary work.
In 2024 Java 17 is the former LTS version and it’s more than fair having Java 17 as minimum requirement.

For this reason, Eclipse itself has started to include a Java 17 JRE with version 2021-12 already - means every Eclipse version >= 2021-12 will meet the current Sonarlint requirements.
Any serious Java developer using Eclipse will use a newer version than the outdated 2021-12 - even if still developing for Java 8 / 11 as target runtime.

Sonarlint for Eclipse had once the requirement that Eclipse runs on Java 11 instead of Java 8 and everyone was fine with it.
Why all this effort now ? This causes more problems and work than it brings any added value. In 2024 it’s time to cut off support for Java 11.

Think of every plugin shipping it’s own runtime, what a mess :scream:

Gilbert

1 Like