Sonarlinr-Core Error moving temp folder

108 views
Skip to first unread message

Paul Borgen

unread,
Aug 2, 2017, 4:42:36 PM8/2/17
to SonarLint
I am getting the below error when I run the below 2 commands. Anyone have any ideas?

I would just like to start from a clean cache every time. I have tried deleting the cahce dir everytime but still have no luck.


Code:
ConnectedGlobalConfiguration connectedGlobalConfiguration = ConnectedGlobalConfiguration.builder()
     .setServerId(propertiesFileReader.getProjectKey())
     .setStorageRoot(Paths.get(Const.SONARQUBE_CACHE_STORAGE))
     .setSonarLintUserHome(Paths.get(Const.SONARQUBE_CACHE))
     .setWorkDir(Paths.get(Const.SONARQUBE_CACHE_WORK))
     .setLogOutput(logOutput)
     .build();
ConnectedSonarLintEngineImpl connectedSonarLintEngineImpl = new ConnectedSonarLintEngineImpl(connectedGlobalConfiguration);
logger.info("Update Sonatlint cache start");
/*This updates the cache with the rules and other metadata from the server. */
connectedSonarLintEngineImpl.update(serverConfiguration, null); ( Command 1)
/* This updates the cache with the issues from the server. Wording is not consistent. It should be updateProject */
connectedSonarLintEngineImpl.updateModule(serverConfiguration, propertiesFileReader.getProjectKey(), null); ( Command 2)
logger.info("Update Sonatlint cache end");

Error:"
1 INFO: An exception was caught and reported. Message: java.nio.file.AccessDeniedException: C:\Users\acs3\.sonarlintcache\work\.sonartmp_1291381066257992562\244719524204279168 -> C:\Users\acs3\.sonarlintcache\storage\CNI\modules\CNI
2017-08-02 20:20:02.821 java.lang.IllegalStateException: Unable to move C:\Users\acs3\.sonarlintcache\work\.sonartmp_1291381066257992562\244719524204279168 to C:\Users\acs3\.sonarlintcache\storage\CNI\modules\CNI
2017-08-02 20:20:02.821 	at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDir(FileUtils.java:47)
2017-08-02 20:20:02.821 	at org.sonarsource.sonarlint.core.client.api.util.FileUtils.replaceDir(FileUtils.java:153)
2017-08-02 20:20:02.821 	at org.sonarsource.sonarlint.core.container.connected.update.perform.ModuleStorageUpdateExecutor

Paul Borgen

unread,
Aug 2, 2017, 4:43:23 PM8/2/17
to SonarLint
What is weird is that the temp folder it is trying to move does not exist sometimes

melanie...@gmail.com

unread,
Aug 3, 2017, 4:14:07 PM8/3/17
to SonarLint
this is the line that is causing the error 

connectedSonarLintEngineImpl.updateModule(serverConfiguration, propertiesFileReader.getProjectKey(), null); ( Command 2)

On Wednesday, August 2, 2017 at 4:42:36 PM UTC-4, Paul Borgen wrote:
Reply all
Reply to author
Forward
0 new messages