Internal error in SonarLint Eclipse plugin since update to 10.6

  • Operating system: Windows
  • SonarLint plugin version:10.6
  • Programming language you’re coding in: Java
  • Is connected mode used:yes
    • Connected to: SonarCloud

Since using version 10.6 of the plugin, each file analysis pops up an “internal error” window.

SonarLint processing file [...]Service.java...
Internal error: java.lang.NullPointerException: Cannot invoke "jetbrains.exodus.entitystore.Entity.getProperty(String)" because the return value of "jetbrains.exodus.entitystore.Entity.getLink(String)" is null

java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "jetbrains.exodus.entitystore.Entity.getProperty(String)" because the return value of "jetbrains.exodus.entitystore.Entity.getLink(String)" is null
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.NullPointerException: Cannot invoke "jetbrains.exodus.entitystore.Entity.getProperty(String)" because the return value of "jetbrains.exodus.entitystore.Entity.getLink(String)" is null
	at org.sonarsource.sonarlint.core.serverconnection.storage.XodusServerIssueStore.adaptTaint(XodusServerIssueStore.java:231)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at org.sonarsource.sonarlint.core.serverconnection.storage.XodusServerIssueStore.lambda$loadTaint$6(XodusServerIssueStore.java:334)
	at java.base/java.util.Optional.map(Optional.java:260)
	at org.sonarsource.sonarlint.core.serverconnection.storage.XodusServerIssueStore.lambda$loadTaint$7(XodusServerIssueStore.java:332)
	at jetbrains.exodus.entitystore.PersistentEntityStoreImpl.computeInReadonlyTransaction(PersistentEntityStoreImpl.java:782)
	at org.sonarsource.sonarlint.core.serverconnection.storage.XodusServerIssueStore.loadTaint(XodusServerIssueStore.java:331)
	at org.sonarsource.sonarlint.core.tracking.TaintVulnerabilityTrackingService.lambda$loadTaintVulnerabilities$26(TaintVulnerabilityTrackingService.java:206)
	at java.base/java.util.Optional.map(Optional.java:260)
	at org.sonarsource.sonarlint.core.tracking.TaintVulnerabilityTrackingService.lambda$loadTaintVulnerabilities$27(TaintVulnerabilityTrackingService.java:206)
	at java.base/java.util.Optional.map(Optional.java:260)
	at org.sonarsource.sonarlint.core.tracking.TaintVulnerabilityTrackingService.loadTaintVulnerabilities(TaintVulnerabilityTrackingService.java:199)
	at org.sonarsource.sonarlint.core.tracking.TaintVulnerabilityTrackingService.lambda$listAll$0(TaintVulnerabilityTrackingService.java:81)
	at java.base/java.util.Optional.map(Optional.java:260)
	at org.sonarsource.sonarlint.core.tracking.TaintVulnerabilityTrackingService.listAll(TaintVulnerabilityTrackingService.java:81)
	at org.sonarsource.sonarlint.core.rpc.impl.TaintVulnerabilityTrackingRpcServiceDelegate.lambda$listAll$0(TaintVulnerabilityTrackingRpcServiceDelegate.java:36)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$0(AbstractRpcServiceDelegate.java:67)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.computeWithLogger(AbstractRpcServiceDelegate.java:135)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$1(AbstractRpcServiceDelegate.java:65)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	... 4 common frames omitted

Error while fetching server taint issues
java.util.concurrent.ExecutionException: org.sonarsource.sonarlint.shaded.org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at org.sonarlint.eclipse.core.internal.utils.JobUtils.waitForFuture(JobUtils.java:60)
	at org.sonarlint.eclipse.core.internal.jobs.SonarLintMarkerUpdater.refreshMarkersForTaint(SonarLintMarkerUpdater.java:165)
	at org.sonarlint.eclipse.core.internal.jobs.TaintIssuesUpdateOnFileOpenedJob.run(TaintIssuesUpdateOnFileOpenedJob.java:65)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.sonarsource.sonarlint.shaded.org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at org.sonarsource.sonarlint.shaded.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
	at org.sonarsource.sonarlint.shaded.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
	at org.sonarsource.sonarlint.core.rpc.protocol.SingleThreadedMessageConsumer.lambda$new$0(SingleThreadedMessageConsumer.java:51)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

This issue still occurs with 10.8 when opening any file.
It’s really annoying - we are paying money for this!

Hi @fs-chris,

Thanks for trying the upgrade and thanks for your patience. We are currently a bit tight on staff and could not respond earlier.

Could you please try to remove the connection (and therefore the binding from the project) from the workspace and re-connect and re-bind again and see if the issue still persists? I cannot reproduce this error on my side sadly.
If the issue still persists, could you also provide a reproducer, please?

I see this being annoying, if the error still occours then you could also downgrade to the latest version where it worked (I guess that was 10.5).

On the contrary I’d like to empathize with you that SonarLint is a free product and is provided to you free of charge compared to SonarCloud, where I guess from your response, you are paying for. But these are different products.

Best,
Tobias

1 Like

Hi Tobias.

Thanks for your help.

I’ve tried unbinding and binding again but the issue occurs again.
I’m not sure, what you mean with removing the connection. Is there anything else I can remove besides the binding?

I found out that the issue seems to be limited to a single project, our main project however. But all files in there, no matter what type: Java, XML, YML, properties, …
Opening files from other projects also bound to SonarCloud works without showing the error.

Is there any cached metadata or else I can try to cleanup after unbinding, respectively before binding again?

Regards,
Christian

Hello @fs-chris,

The difference between connection and binding is the following:
Connection is a settings that allow you to connect to the server, in your case, SonarCloud. For SonarCloud it’s your organization name and token.
Binding is a setting that connects the specific project on the local computer to the analyzed project on the server. For one connection you can have many bindings. Also, you can remove the binding without removing the connection.
So Tobias asks that you make sure you remove both of them—the project binding and the connection to SonarCloud.
Here’s the link to the docs for clarity:

Regarding the metadata, yes, we have local storage in the ~/.sonarlint directory. So you can try to purge it after the connection and binding are removed.

Best,
Kirill

Thanks for the explanation Kirill.
Deleting the connection and reconnecting finally solved the issue.

Thanks again.
Christian

1 Like