SonarScanner for .Net - Since SonarQube 10.6, NoSuchFileException: NONE

Hello,

I upgraded SonarQube to version 10.6.
From then, on Windows Server, SonarScanner.MSBuild.exe throws “NoSuchFileException: NONE”.
I thought of a ssl certificate issue, but server version is accurately displayed in console, and Wireshark shows application data successfully transmitted.
I then searched for relevant access issue with Process Monitor, but found nothing particular.

  • SonarQube 10.6 (Zip), SonarScanner for .Net 6.2 (Windows)
$ C:\SonarScanner\SonarScanner.MSBuild.exe begin /k:"bases-de-donnees_mariadb_attachment_AYoYNsk-vsfaJSStmR18" /d:sonar.token="sqa_********" /d:"sonar.host.url=https://sonarqubeb1.groupe.lacour/"e
SonarScanner for MSBuild 6.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
11:12:48.878  Updating build integration targets...
11:12:49.16  Fetching analysis configuration settings...
11:12:49.584  Provisioning analyzer assemblies for cs...
11:12:49.584  Installing required Roslyn analyzers...
11:12:49.584  Processing plugin: csharp version 9.27.0.93347
11:12:49.805  Processing plugin: vbnet version 9.27.0.93347
11:12:50.024  Provisioning analyzer assemblies for vbnet...
11:12:50.024  Installing required Roslyn analyzers...
11:12:50.024  Processing plugin: csharp version 9.27.0.93347
11:12:50.034  Processing plugin: vbnet version 9.27.0.93347
11:12:50.045  Incremental PR analysis: Base branch parameter was not provided.
11:12:50.045  Cache data is empty. A full analysis will be performed.
11:12:50.071  Pre-processing succeeded.
$ MSBuild.exe Attachment.sln /t:Rebuilde
Version MSBuild 17.10.4+10fbfbf2e pour .NET Framework
La génération a démarré 7/12/2024 11:12:50 AM.

...

La génération a réussi.

...

Temps écoulé 00:00:09.67
$ C:\SonarScanner\SonarScanner.MSBuild.exe end /d:sonar.token="sqa_********"e
SonarScanner for MSBuild 6.2
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
Calling the TFS Processor executable...
The TFS Processor has finished
Calling the SonarScanner CLI...
Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.keyStore=NONE -Djavax.net.ssl.keyStoreType=Windows-MY -Djavax.net.ssl.trustStore=NONE -Djavax.net.ssl.trustStoreType=Windows-ROOT
INFO: Scanner configuration file: C:\SonarScanner\sonar-scanner-5.0.1.3006\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\builds\bases-de-donnees\mariadb\attachment\.sonarqube\out\sonar-project.properties
INFO: SonarScanner 5.0.1.3006
INFO: Java 21.0.1 Oracle Corporation (64-bit)
INFO: Windows Server 2022 10.0 amd64
INFO: User cache: C:\builds\bases-de-donnees\mariadb\attachment\.sonar\cache
INFO: Analyzing on SonarQube server 10.6.0.92116
INFO: Default locale: "fr_FR", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 3.205s
INFO: Final Memory: 5M/48M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6ca8564a-org.sonar.scanner.bootstrap.ScannerPluginRepository': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6ca8564a-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6ca8564a-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is nl.altindag.ssl.exception.GenericKeyStoreException: java.nio.file.NoSuchFileException: NONE
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:224)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$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:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6ca8564a-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6ca8564a-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is nl.altindag.ssl.exception.GenericKeyStoreException: java.nio.file.NoSuchFileException: NONE
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:224)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
	... 26 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6ca8564a-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is nl.altindag.ssl.exception.GenericKeyStoreException: java.nio.file.NoSuchFileException: NONE
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:224)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
	... 40 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is nl.altindag.ssl.exception.GenericKeyStoreException: java.nio.file.NoSuchFileException: NONE
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:633)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
	... 54 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is nl.altindag.ssl.exception.GenericKeyStoreException: java.nio.file.NoSuchFileException: NONE
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
	... 68 more
Caused by: nl.altindag.ssl.exception.GenericKeyStoreException: java.nio.file.NoSuchFileException: NONE
	at nl.altindag.ssl.util.KeyStoreUtils.loadKeyStore(KeyStoreUtils.java:92)
	at nl.altindag.ssl.SSLFactory$Builder.withIdentityMaterial(SSLFactory.java:511)
	at nl.altindag.ssl.SSLFactory$Builder.withSystemPropertyDerivedMaterial(SSLFactory.java:842)
	at nl.altindag.ssl.SSLFactory$Builder.withSystemPropertyDerivedIdentityMaterial(SSLFactory.java:451)
	at org.sonar.scanner.http.ScannerWsClientProvider.configureSsl(ScannerWsClientProvider.java:139)
	at org.sonar.scanner.http.ScannerWsClientProvider.provide(ScannerWsClientProvider.java:74)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 69 more
Caused by: java.nio.file.NoSuchFileException: NONE
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:234)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:379)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:431)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
	at java.base/java.nio.file.Files.newInputStream(Files.java:159)
	at nl.altindag.ssl.util.KeyStoreUtils.loadKeyStore(KeyStoreUtils.java:89)
	... 77 more
ERROR: 
The SonarScanner did not complete successfully
11:13:04.052  Post-processing failed. Exit code: 1

Hey there.

Are you setting these on purpose (the environment variable JAVA_TOOL_OPTIONS)?

Thanks for helping,

SonarQube Server is accessed through a company self-signed certificate, located in the Windows certificate store.
That’s why my first try was with Wireshark to verify communication.

So you are setting them on purpose?

The issue is that this is being interpreted as a file path.

I think if you exclude setting it, you’ll have a better chance of analysis succeeding.

2 Likes

Well, this variable has been set this way for more than a year, seems Version 10.6 made this blocking.

Anyway, it’s working as intended now !
Thank you for your support and reactivity !!

It does look like we started to do some parsing of those parameters, probably starting in v10.6

If this gets any noisier (other reports), I’ll pass it to the team to see if we should parse the “NONE” value differently, but right now I think it’s working as intended.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.