ResourceException on closed project

Please provide

  • Operating system: Windows 11
  • SonarLint plugin version:10.2.0.81875
  • Programming language you’re coding in: n/a
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarQube 8.9.9

And a thorough description of the problem / question:

Closed a project about 15 minutes ago and this error suddenly showed up:

Error collecting files in project bbae-admin
org.eclipse.core.internal.resources.ResourceException(/bbae-admin)[372]: java.lang.Exception: Project 'bbae-admin' is not open.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:186)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:100)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:92)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:154)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:142)
	at org.sonarlint.eclipse.core.internal.resources.DefaultSonarLintProjectAdapter.files(DefaultSonarLintProjectAdapter.java:85)
	at org.sonarlint.eclipse.core.internal.backend.SonarLintEclipseHeadlessRpcClient.listFiles(SonarLintEclipseHeadlessRpcClient.java:85)
	at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$29(SonarLintRpcClientImpl.java:324)
	at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:117)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

Project 'bbae-admin' is not open.
org.eclipse.core.internal.resources.ResourceException(/bbae-admin)[372]: java.lang.Exception: Project 'bbae-admin' is not open.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:186)
	at org.eclipse.core.internal.resources.Project.hasNature(Project.java:564)
	at org.sonarlint.eclipse.m2e.internal.M2eUtils.checkIfMavenProject(M2eUtils.java:37)
	at org.sonarlint.eclipse.m2e.internal.MavenUtils.isPartOfHierarchy(MavenUtils.java:74)
	at org.sonarlint.eclipse.m2e.internal.MavenModuleFilter.partOfHierarchy(MavenModuleFilter.java:73)
	at org.sonarlint.eclipse.core.internal.backend.SonarLintEclipseHeadlessRpcClient.listFiles(SonarLintEclipseHeadlessRpcClient.java:92)
	at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$29(SonarLintRpcClientImpl.java:324)
	at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:117)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)


Hi @gnl42,

first things first: Could you reproduce the issue? I’m asking because of that line here:

org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$29(SonarLintRpcClientImpl.java:324)

This is only invoked when SonarLint is started and once projects are opened. To me, it looks like SonarLint was very slow starting up, but 15 minutes sounds way too long.

If you can reproduce it, please provide me with the full SonarLint Console log output, as I want to check if the root cause may be that SonarLint didn’t really catch if the project was closed or not.

Best,
Tobias