Unable to load plugin .../sonar-secrets-plugin-1.1.0.36766.jar when Eclipse is installed in a directory with a whitespace

Hi there,

just installed Eclipse 2021-12 under
C:\Program files\
and installed SonarLint via the Marketplace.

After I set up the connection to SonarQube, the Console spits out the following:

Starting SonarLint for Eclipse 7.2.1.42550
Started security hotspot handler on port 64120
Starting SonarLint engine for connection 'my.sonarqubeserver.com'...
Unable to load plugin bundleentry://957.fwk1325267910/plugins/sonar-secrets-plugin-1.1.0.36766.jar
java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Program Files/Eclipse/2021-12/plugins/org.sonarlint.eclipse.core_7.2.1.42550/plugins/sonar-secrets-plugin-1.1.0.36766.jar
	at java.base/java.net.URI$Parser.fail(URI.java:2974)
	at java.base/java.net.URI$Parser.checkChars(URI.java:3145)
	at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3227)
	at java.base/java.net.URI$Parser.parse(URI.java:3175)
	at java.base/java.net.URI.<init>(URI.java:623)
	at java.base/java.net.URL.toURI(URL.java:1056)
	at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.toPath(StandaloneEngineFacade.java:96)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.findEmbeddedPlugin(ConnectedEngineFacade.java:163)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.findEmbeddedSecretsPlugin(ConnectedEngineFacade.java:168)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.getOrCreateEngine(ConnectedEngineFacade.java:133)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.doWithEngine(ConnectedEngineFacade.java:182)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.updateStorage(ConnectedEngineFacade.java:349)
	at org.sonarlint.eclipse.core.internal.jobs.ServerUpdateJob.run(ServerUpdateJob.java:47)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Seems like SonarLint has a problem with the Eclipse installation directory containing a whitespace.
Installed JRE is the default that comes with eclipse, but it also fails with the latest jdk8 from Adoptium.

If you need some more info let me know.

Hi @darenkster

Thanks for reporting this issue. You are right, this is caused by the space in the installation directory of Eclipse. This is a mistake from our side, there is a way to support this properly.
I have created a ticket, it will be part of the next sprint (starting today), so you can expect a release by the end of next week:
https://jira.sonarsource.com/browse/SLE-501

In the meantime, I suggest you move Eclipse installation dir to another folder, of you can simply revert to SonarLint 7.1

1 Like

Another workaround, waiting for the official release of SonarLint 7.3, is to use this build:
https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/eclipse/org.sonarlint.eclipse.site/7.3.0.42818/org.sonarlint.eclipse.site-7.3.0.42818.zip
Let me know if this fixes the problem.

1 Like

Hey Julien,
your workaround works, tested it with C:\New Folder\ and it works fine.
Thank you for the quick fix.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

FYI SonarLint for Eclipse 7.3 has been released with a fix for this issue.