How to solve the "Unable to update binding" error in SONAR LINT?

varunsinghal65 picture varunsinghal65 · Mar 23, 2018 · Viewed 7.5k times · Source

Scenario :

Recently I have installed SONAR lint v3.4 on Eclipse Oxygen.2 Release (4.7.2

I have SONAR qube server running and I was successfully able to connect SONAR lint to it.

Problem :

However after the connection when I try to take updates from the SONARQUBE server.

Eclipse throws the following error :

Failed to update binding for 1 project, Unable to update binding for

project 'xyz-project'

Unable to move

C:\Users\vsinghal\eclipse-workspace\.sonarlint\work{SONARQUBE server domain}\.sonartmp_7415526389500015248\8960528228988360636

to

C:\Users\vsinghal\eclipse-workspace\.sonarlint\storage{SONARQUBE server domain}\modules\xyz-project

I checked the error log, following is the trace in eclipse :

java.lang.IllegalStateException: C:\Users\vsinghal\eclipse-workspace\.sonarlint\work\{SONARQUBE server domain name}\.sonartmp_7415526389500015248\8960528228988360636  to C:\Users\vsinghal\eclipse-workspace\.sonarlint\storage\{SONARQUBE server domain name}\modules\xyz-project
    at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDir(FileUtils.java:47)
    at org.sonarsource.sonarlint.core.client.api.util.FileUtils.replaceDir(FileUtils.java:153)
    at org.sonarsource.sonarlint.core.container.connected.update.perform.ModuleStorageUpdateExecutor.update(ModuleStorageUpdateExecutor.java:63)
    at org.sonarsource.sonarlint.core.container.connected.ConnectedContainer.updateModule(ConnectedContainer.java:118)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.updateModule(ConnectedSonarLintEngineImpl.java:260)
    at org.sonarlint.eclipse.core.internal.server.Server.updateProjectStorage(Server.java:338)
    at org.sonarlint.eclipse.core.internal.jobs.ServerUpdateJob.run(ServerUpdateJob.java:66)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.nio.file.AccessDeniedException: C:\Users\vsinghal\eclipse-workspace\.sonarlint\work\{SONARQUBE server domain name}\.sonartmp_7415526389500015248\8960528228988360636  to C:\Users\vsinghal\eclipse-workspace\.sonarlint\storage\{SONARQUBE server domain name}\modules\xyz-project
    at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
    at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
    at java.nio.file.Files.move(Unknown Source)
    at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDirPreferAtomic(FileUtils.java:53)
    at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDir(FileUtils.java:45)
    ... 7 more

What did I do try and solve it ?

  • I gave complete permissions/full control to Everyone for the
    eclipse workspace folder in windows explorer .

  • I tried opening eclipse as admin

  • I have checked the SONAR server is accessible

but after all these steps the error still doesn't go.

Can anyone help me in finding a solution to this ?

Answer

Dave Carey picture Dave Carey · Mar 28, 2018

I'm currently experiencing the same issue using SolarLint in both eclipse and Intellij.

There is a reasonable suggestion on google groups, https://groups.google.com/forum/#!topic/sonarlint/nQW1kJBjUYg which suggests that the cause could by a virus scanner interfering in the process. However thus far despite following that theory, I'm still experiencing the issue. Something to try though.