My project contain symbolic link(D:\projects\Source\Core\SPIIntegrationTest\TestApps\WLRoots\Test\ShellTestUtil) to another folder in the same project. When I start “sonar-scanner.bat” it fails on the on indexing files with error:
INFO: Load project repositories
INFO: Load project repositories (done) | time=1878ms
INFO: 10454 files indexed... (last one was Source/BrowserUI/ChatBrowserUI/public/styles/images/emoji_36x36/1f193.png)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 32.161s
INFO: Final Memory: 9M/160M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Failed to index files
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer.indexFiles(ProjectFileIndexer.java:204)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer.index(ProjectFileIndexer.java:159)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer.indexModulesRecursively(ProjectFileIndexer.java:138)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer.index(ProjectFileIndexer.java:105)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:352)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:150)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.nio.file.FileSystemException: D:\projects\Source\Core\SPIIntegrationTest\TestApps\WLRoots\Test\ShellTestUtil: The file cannot be accessed by the system.
at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsFileSystemProvider.isHidden(Unknown Source)
at java.base/java.nio.file.Files.isHidden(Unknown Source)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer$IndexFileVisitor.visitFile(ProjectFileIndexer.java:242)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer$IndexFileVisitor.visitFile(ProjectFileIndexer.java:215)
at java.base/java.nio.file.Files.walkFileTree(Unknown Source)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer.indexDirectory(ProjectFileIndexer.java:211)
at org.sonar.scanner.scan.filesystem.ProjectFileIndexer.indexFiles(ProjectFileIndexer.java:197)
... 23 more
ERROR:
If I delete this file, everything works good
Must-share information (formatted with Markdown):
- which versions are you using: sonar-scanner-4.0.0.1744-windows, also tried 4.6.2, 4.6.1 for windows x64
- what are you trying to achieve: analyze my project
- what have you tried so far to achieve this:
- added this file and its directory to sonar.coverage.exclusions
- added this file and its directory to sonar.exclusions
- added this file and its directory to sonar.test.exclusions
- installed https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
- started from cmd, shell with or without admin rights
- on linux(ubuntu20) indexing works, but I need on windows 10 x64
Do you have any ideas how to fix this problem?
update: as mentioned on Starting SonarQube Error java.nio.file.FileSystemException - #3 by bcipollone, grant full permission for everyone for the whole project folder. Debug logs has the same error and no additional information