Spring Tool Suite 4 Error


(JK Bishop) #1

After installing the SonarLint plugin for Eclipse IDE from Marketplace and restarting the IDE I get the error message, see below, when trying to analyze file(s) in the project. I am new to the SonarLint and not sure how to proceed, any help would be welcomed.

Starting SonarLint for Eclipse 4.1.0.201901311043
Starting standalone SonarLint engine 4.1.0.201901311043…
No changed files found
SonarLint analysis of project … (74 files processed)…
Error during execution of SonarLint analysis
java.lang.IllegalStateException: java.nio.file.AccessDeniedException: C:\Users<<user_name>>\AppData\Local\Application Data

at org.sonar.java.AbstractJavaClasspath.getFilesInDir(AbstractJavaClasspath.java:149)*
at org.sonar.java.AbstractJavaClasspath.getFilesForPattern(AbstractJavaClasspath.java:135)*
at org.sonar.java.AbstractJavaClasspath.getFilesFromProperty(AbstractJavaClasspath.java:88)*
at org.sonar.java.JavaClasspath.init(JavaClasspath.java:56)*
at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:280)*
at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:175)*
at org.sonar.java.JavaSquid.(JavaSquid.java:82)*
at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:91)*
at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:81)*
at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:72)*
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:132)*
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)*
at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)*
at org.sonarsource.sonarlint.core.container.standalone.StandaloneGlobalContainer.analyze(StandaloneGlobalContainer.java:147)*
at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:89)*
at org.sonarlint.eclipse.core.internal.jobs.StandaloneSonarLintEngineFacade.runAnalysis(StandaloneSonarLintEngineFacade.java:76)*
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:55)*
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.run(AbstractAnalyzeProjectJob.java:397)*
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:205)*
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:167)*
at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.runInWorkspace(AbstractSonarProjectJob.java:44)*
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)*
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)*
Caused by: java.nio.file.AccessDeniedException: C:\Users<<user_name>>\AppData\Local\Application Data
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)*
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)*
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)*
at sun.nio.fs.WindowsDirectoryStream.(WindowsDirectoryStream.java:86)*
at sun.nio.fs.WindowsFileSystemProvider.newDirectoryStream(WindowsFileSystemProvider.java:518)*
at java.nio.file.Files.newDirectoryStream(Files.java:457)*
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300)*
at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:372)*
at java.nio.file.Files.walkFileTree(Files.java:2706)*
at java.nio.file.Files.walkFileTree(Files.java:2742)*
at org.sonar.java.AbstractJavaClasspath$AbstractFileFinder.find(AbstractJavaClasspath.java:243)*
at org.sonar.java.AbstractJavaClasspath.getMatchingDirs(AbstractJavaClasspath.java:174)*
at org.sonar.java.AbstractJavaClasspath.getFilesInDir(AbstractJavaClasspath.java:146)*
… 22 more

(Julien Henry) #2

Hi @JKBishop

For some reason your Java classpath seems to contain a file that is not readable.

Could you please enable verbose output in the SonarLint console, and look for the value of the property sonar.java.libraries or sonar.java.binaries for any file located in C:\Users<<user_name>>\AppData\Local\Application Data and see why this file is part of your classpath, and why the STS process is not allowed to access it (maybe an anti-virus software?).