1

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 ?

varunsinghal65
  • 536
  • 1
  • 5
  • 20

1 Answers1

1

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.

Dave Carey
  • 53
  • 4
  • I raised this question in SONAR LINT google groups, apparently antivirus is screwing, https://groups.google.com/forum/#!topic/sonarlint/OsmwDrkpDw8 try disabling your antivirus – varunsinghal65 Mar 29 '18 at 08:53
  • 1
    Can you check write permissions of .sonarLint folder (`Right click on folder -> properties`) , it will be in `{eclipseWorkspace}\.sonarlint`, if they are read only, then i think that might me the root cause because SONARLINT tries to move a file which is a write operation, and exact exception is `java.nio.file.AccessDeniedException`. Can you grant write access to the .sonarlint folder and then try again – varunsinghal65 Mar 30 '18 at 14:37