Error in SonarLint for IntelliJ 09022023

Environment:

  • Java: JetBrains s.r.o. 17.0.7
  • OS: Mac OS X x86_64
  • IDE: IntelliJ IDEA 2023.1.5
  • SonarLint: 8.5.0.75082

java.lang.RuntimeException: Cannot invoke (class=ModuleChangeListener, method=modulesAdded, topic=ModuleListener)
at c.ij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:657)
at c.ij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:415)
at c.ij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:394)
at c.ij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
at c.ij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:454)
at jdk.proxy1/jdk.proxy1.$Proxy119.modulesAdded(Unknown Source)
at c.ij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge.fireModulesAdded(ModuleManagerComponentBridge.kt:338)
at c.ij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge.access$fireModulesAdded(ModuleManagerComponentBridge.kt:53)
at c.ij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity.run(ModuleManagerComponentBridge.kt:61)
at c.ij.ide.startup.impl.StartupManagerImpl.runInitProjectActivities(StartupManagerImpl.kt:215)
at c.ij.ide.startup.impl.StartupManagerImpl.access$runInitProjectActivities(StartupManagerImpl.kt:69)
at c.ij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invokeSuspend(trace.kt:111)
at c.ij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invoke(trace.kt)

Hi @jimmyd, thank you for your report!

Would you be able to provide the full stack trace of this error?

I suspect this might be a regression from a previous fix we did following this community report. Edit: not the case

I’m having the same (?) issue with the latest update (8.5.0.75082). Here’s the full trace IDEA (2023.3 [232.8660.185]) gives me:

java.lang.RuntimeException: Cannot invoke (class=ModuleChangeListener, method=modulesAdded, topic=ModuleListener)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:676)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:422)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:401)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:460)
	at jdk.proxy2/jdk.proxy2.$Proxy94.modulesAdded(Unknown Source)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerBridgeImpl$Companion.fireModulesAdded(ModuleManagerBridgeImpl.kt:504)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity$run$2.invoke(ModuleManagerComponentBridge.kt:55)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity$run$2.invoke(ModuleManagerComponentBridge.kt:54)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:248)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:199)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity.run(ModuleManagerComponentBridge.kt:54)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runInitProjectActivities(StartupManagerImpl.kt:220)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runInitProjectActivities(StartupManagerImpl.kt:72)
	at com.intellij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invokeSuspend(trace.kt:121)
	at com.intellij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invoke(trace.kt)
	at com.intellij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invoke(trace.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImpl.initProject(StartupManagerImpl.kt:568)
	at com.intellij.openapi.project.impl.ProjectManagerImplKt$runInitProjectActivities$1.invokeSuspend(ProjectManagerImpl.kt:977)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.util.concurrent.ExecutionException: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.sonarlint.core.http.ConnectionAwareHttpClientProvider': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provideHttpClientProvider' defined in org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig: Bean instantiation via factory method failed; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is java.lang.IllegalArgumentException: Could not create TrustStore because certificate is absent
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at org.sonarlint.intellij.core.BackendService$initializedBackend$2.invoke(BackendService.kt:139)
	at org.sonarlint.intellij.core.BackendService$initializedBackend$2.invoke(BackendService.kt:95)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at org.sonarlint.intellij.core.BackendService.getInitializedBackend(BackendService.kt:95)
	at org.sonarlint.intellij.core.BackendService.moduleAdded(BackendService.kt:251)
	at org.sonarlint.intellij.module.ModuleChangeListener.moduleAdded(ModuleChangeListener.kt:41)
	at com.intellij.openapi.project.ModuleListener.modulesAdded(ModuleListener.java:29)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:699)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:663)
	... 27 more
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.sonarlint.core.http.ConnectionAwareHttpClientProvider': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provideHttpClientProvider' defined in org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig: Bean instantiation via factory method failed; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is java.lang.IllegalArgumentException: Could not create TrustStore because certificate is absent
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.sonarsource.sonarlint.core.SonarLintBackendImpl.lambda$initialize$2(SonarLintBackendImpl.java:60)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provideHttpClientProvider' defined in org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig: Bean instantiation via factory method failed; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is java.lang.IllegalArgumentException: Could not create TrustStore because certificate is absent
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 20 more
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is java.lang.IllegalArgumentException: Could not create TrustStore because certificate is absent
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 34 more
Caused by: java.lang.IllegalArgumentException: Could not create TrustStore because certificate is absent
	at nl.altindag.ssl.util.internal.ValidationUtils.lambda$requireNotEmpty$2(ValidationUtils.java:47)
	at nl.altindag.ssl.util.internal.ValidationUtils.requireNotEmpty(ValidationUtils.java:52)
	at nl.altindag.ssl.util.internal.ValidationUtils.requireNotEmpty(ValidationUtils.java:47)
	at nl.altindag.ssl.util.KeyStoreUtils.createTrustStore(KeyStoreUtils.java:177)
	at nl.altindag.ssl.util.KeyStoreUtils.loadSystemKeyStores(KeyStoreUtils.java:219)
	at nl.altindag.ssl.util.TrustManagerUtils.createTrustManagerWithSystemTrustedCertificates(TrustManagerUtils.java:89)
	at nl.altindag.ssl.SSLFactory$Builder.withSystemTrustMaterial(SSLFactory.java:210)
	at org.sonarsource.sonarlint.core.http.HttpClientProvider.<init>(HttpClientProvider.java:63)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig.provideHttpClientProvider(SonarLintSpringAppConfig.java:156)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig$$EnhancerBySpringCGLIB$$f3e57aa0.CGLIB$provideHttpClientProvider$6(<generated>)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig$$EnhancerBySpringCGLIB$$f3e57aa0$$FastClassBySpringCGLIB$$b432062b.invoke(<generated>)
	at org.sonarsource.sonarlint.shaded.org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig$$EnhancerBySpringCGLIB$$f3e57aa0.provideHttpClientProvider(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 35 more

Attached log with the same problem

idea.log (3.6 MB)

Environment:

IntelliJ IDEA 2023.2 (Ultimate Edition)
Build #IU-232.8660.185, built on July 26, 2023
Runtime version: 17.0.7+7-b1000.6 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.5
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Metal Rendering is ON

Thank you for your reports, this is related to our new HTTP Client and trust store management, and it looks like it’s not finding any system certificates on your machines.

To have more context:

  • Are you running on any virtual machine?
  • Do you have any certificates on your system? For Linux, a common path is usually /etc/ssl/certs

@lpeter, on which OS are you running?

I’m on it, and depending on the criticality of this issue, we may have to create a patch for this, otherwise this will be fixed for next release at the end of the month.

I’m running on openSUSE Tumbleweed 20230801. (To which I’m actually fairly new.)

I’m not running on any virtual machine. I installed the IDE with JetBrains toolbox, and as far as I can tell it doesn’t use any sandboxing technology.

/etc/ssl/certs is a symlink to /var/lib/ca-certificates/pem, which has 411 files in it. The ca-certificates package is installed.

IDEA uses its bundled JDK (17.0.7), and I also have java-17-openjdk-devel installed (17.0.8). (Unsure which one is relevant for the plugin.)

I am using a company-issued MacOS machine. It is using Zscalar and Global Protect for system security. Zscalar replaces the certs with its own so that it is able to examine the traffic.

We keep on investigating the case, in the meantime and if that’s a blocker, you can downgrade to the previous 8.4 version by following the steps to directly install the plugin from disk.

If you are MacOS, could you also please share the full stack trace of the issue?

Edit: We will proceed on releasing a patch version on Monday

Hi, same issue here:

Environment:

  • Java: JetBrains s.r.o. 17.0.7
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.2
  • SonarLint: 8.5.0.75082
java.lang.RuntimeException: Cannot invoke (class=ModuleChangeListener, method=modulesAdded, topic=ModuleListener)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:676)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:422)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:401)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:460)
	at jdk.proxy1/jdk.proxy1.$Proxy107.modulesAdded(Unknown Source)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerBridgeImpl$Companion.fireModulesAdded(ModuleManagerBridgeImpl.kt:504)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity$run$2.invoke(ModuleManagerComponentBridge.kt:55)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity$run$2.invoke(ModuleManagerComponentBridge.kt:54)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:248)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:199)
	at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerComponentBridge$ModuleManagerInitProjectActivity.run(ModuleManagerComponentBridge.kt:54)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runInitProjectActivities(StartupManagerImpl.kt:220)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runInitProjectActivities(StartupManagerImpl.kt:72)
	at com.intellij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invokeSuspend(trace.kt:121)
	at com.intellij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invoke(trace.kt)
	at com.intellij.ide.startup.impl.StartupManagerImpl$initProject$lambda$2$$inlined$useWithScope2$1.invoke(trace.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImpl.initProject(StartupManagerImpl.kt:568)
	at com.intellij.openapi.project.impl.ProjectManagerImplKt$runInitProjectActivities$1.invokeSuspend(ProjectManagerImpl.kt:977)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.util.concurrent.ExecutionException: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.sonarlint.core.http.ConnectionAwareHttpClientProvider': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provideHttpClientProvider' defined in org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig: Bean instantiation via factory method failed; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is nl.altindag.ssl.exception.GenericCertificateException: There is no valid certificate present to parse. Please make sure to supply a valid der formatted certificate
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at org.sonarlint.intellij.core.BackendService$initializedBackend$2.invoke(BackendService.kt:139)
	at org.sonarlint.intellij.core.BackendService$initializedBackend$2.invoke(BackendService.kt:95)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at org.sonarlint.intellij.core.BackendService.getInitializedBackend(BackendService.kt:95)
	at org.sonarlint.intellij.core.BackendService.moduleAdded(BackendService.kt:251)
	at org.sonarlint.intellij.module.ModuleChangeListener.moduleAdded(ModuleChangeListener.kt:41)
	at com.intellij.openapi.project.ModuleListener.modulesAdded(ModuleListener.java:29)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:699)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:663)
	... 27 more
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.sonarlint.core.http.ConnectionAwareHttpClientProvider': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provideHttpClientProvider' defined in org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig: Bean instantiation via factory method failed; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is nl.altindag.ssl.exception.GenericCertificateException: There is no valid certificate present to parse. Please make sure to supply a valid der formatted certificate
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.sonarsource.sonarlint.core.SonarLintBackendImpl.lambda$initialize$2(SonarLintBackendImpl.java:60)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provideHttpClientProvider' defined in org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig: Bean instantiation via factory method failed; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is nl.altindag.ssl.exception.GenericCertificateException: There is no valid certificate present to parse. Please make sure to supply a valid der formatted certificate
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 20 more
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.http.HttpClientProvider]: Factory method 'provideHttpClientProvider' threw exception; nested exception is nl.altindag.ssl.exception.GenericCertificateException: There is no valid certificate present to parse. Please make sure to supply a valid der formatted certificate
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 34 more
Caused by: nl.altindag.ssl.exception.GenericCertificateException: There is no valid certificate present to parse. Please make sure to supply a valid der formatted certificate
	at nl.altindag.ssl.util.CertificateUtils.parseDerCertificate(CertificateUtils.java:261)
	at nl.altindag.ssl.util.CertificateUtils.parseCertificate(CertificateUtils.java:240)
	at nl.altindag.ssl.util.CertificateUtils.parsePemCertificate(CertificateUtils.java:220)
	at nl.altindag.ssl.util.MacCertificateUtils.getCertificates(MacCertificateUtils.java:58)
	at nl.altindag.ssl.util.KeyStoreUtils.loadSystemKeyStores(KeyStoreUtils.java:212)
	at nl.altindag.ssl.util.TrustManagerUtils.createTrustManagerWithSystemTrustedCertificates(TrustManagerUtils.java:89)
	at nl.altindag.ssl.SSLFactory$Builder.withSystemTrustMaterial(SSLFactory.java:210)
	at org.sonarsource.sonarlint.core.http.HttpClientProvider.<init>(HttpClientProvider.java:63)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig.provideHttpClientProvider(SonarLintSpringAppConfig.java:156)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig$$EnhancerBySpringCGLIB$$284a5397.CGLIB$provideHttpClientProvider$6(<generated>)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig$$EnhancerBySpringCGLIB$$284a5397$$FastClassBySpringCGLIB$$51c10aa4.invoke(<generated>)
	at org.sonarsource.sonarlint.shaded.org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at org.sonarsource.sonarlint.core.spring.SonarLintSpringAppConfig$$EnhancerBySpringCGLIB$$284a5397.provideHttpClientProvider(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 35 more
Caused by: java.security.cert.CertificateParsingException: Empty issuer DN not allowed in X509Certificates
	at java.base/sun.security.x509.X509CertInfo.parse(X509CertInfo.java:658)
	at java.base/sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:169)
	at java.base/sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1793)
	at java.base/sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:184)
	at java.base/sun.security.x509.X509CertImpl.newX509CertImpl(X509CertImpl.java:310)
	at java.base/sun.security.provider.X509Factory.parseX509orPKCS7Cert(X509Factory.java:471)
	at java.base/sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:356)
	at java.base/java.security.cert.CertificateFactory.generateCertificates(CertificateFactory.java:480)
	at nl.altindag.ssl.util.CertificateUtils.parseDerCertificate(CertificateUtils.java:255)
	... 53 more

running on macOS without VM and no certs in /stc/ssl/certs folder

We just released a new patch release, version 8.5.1, that should fix this issue. Could you please try and see if it fixes the problem?

3 Likes

The problem is fixed for me with the new update, thank you.

1 Like

fixed for me on macOS

1 Like

Fixed for me on MacOS

Thank you

1 Like