question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IllegalStateException (loader constraint viloation) when analyzing, new in 1.20

See original GitHub issue

I had no issues with 1.19, but I’m getting this now. Running 2022.1 on a mac.

ExternalToolPass: 

com.intellij.diagnostic.PluginException: annotator: io.gitlab.arturbosch.detekt.idea.DetektAnnotator@dcfda96 (class io.gitlab.arturbosch.detekt.idea.DetektAnnotator) [Plugin: detekt]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.processError(ExternalToolPass.java:272)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:221)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:212)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$0(ExternalToolPass.java:190)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.runChangeAware(ExternalToolPass.java:287)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$2(ExternalToolPass.java:190)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:343)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:189)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:332)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:322)
	at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:271)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:285)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:240)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:241)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:388)
	at com.intellij.util.Alarm$Request.run(Alarm.java:377)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:223)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalStateException: Analyzing /Users/mike/src/whatever/test/src/main/kotlin/Foo.kt led to an exception. 
The original exception message was: loader constraint violation: when resolving method 'org.slf4j.ILoggerFactory org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()' the class loader com.intellij.ide.plugins.cl.PluginClassLoader @71d200b8 of the current class, org/slf4j/LoggerFactory, and the class loader com.intellij.util.lang.PathClassLoader @5d3411d for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature (org.slf4j.LoggerFactory is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @71d200b8, parent loader 'bootstrap'; org.slf4j.impl.StaticLoggerBinder is in unnamed module of loader com.intellij.util.lang.PathClassLoader @5d3411d)
Running detekt '1.20.0' on Java '11.0.14.1+1-b2043.25' on OS 'Mac OS X'
If the exception message does not help, please feel free to create an issue on our GitHub page.
	at io.gitlab.arturbosch.detekt.core.AnalyzerKt.throwIllegalStateException(Analyzer.kt:162)
	at io.gitlab.arturbosch.detekt.core.AnalyzerKt.access$throwIllegalStateException(Analyzer.kt:1)
	at io.gitlab.arturbosch.detekt.core.Analyzer.runSync(Analyzer.kt:70)
	at io.gitlab.arturbosch.detekt.core.Analyzer.run(Analyzer.kt:52)
	at io.gitlab.arturbosch.detekt.core.tooling.Lifecycle$analyze$result$1.invoke(Lifecycle.kt:47)
	at io.gitlab.arturbosch.detekt.core.tooling.Lifecycle$analyze$result$1.invoke(Lifecycle.kt:44)
	at io.gitlab.arturbosch.detekt.core.util.PerformanceMonitor.measure(PerformanceMonitor.kt:42)
	at io.gitlab.arturbosch.detekt.core.tooling.Lifecycle$DefaultImpls.measure(Lifecycle.kt:34)
	at io.gitlab.arturbosch.detekt.core.tooling.Lifecycle$DefaultImpls.analyze(Lifecycle.kt:44)
	at io.gitlab.arturbosch.detekt.core.tooling.DefaultLifecycle.analyze(Lifecycle.kt:61)
	at io.gitlab.arturbosch.detekt.core.tooling.AnalysisFacade$runAnalysis$1.invoke(AnalysisFacade.kt:48)
	at io.gitlab.arturbosch.detekt.core.tooling.AnalysisFacade$runAnalysis$1.invoke(AnalysisFacade.kt:47)
	at io.gitlab.arturbosch.detekt.core.tooling.ProcessingSpecSettingsBridgeKt.withSettings(ProcessingSpecSettingsBridge.kt:26)
	at io.gitlab.arturbosch.detekt.core.tooling.AnalysisFacade.runAnalysis$detekt_core(AnalysisFacade.kt:47)
	at io.gitlab.arturbosch.detekt.core.tooling.AnalysisFacade.run(AnalysisFacade.kt:33)
	at io.gitlab.arturbosch.detekt.idea.ConfiguredService.execute(ConfiguredService.kt:98)
	at io.gitlab.arturbosch.detekt.idea.ConfiguredService.execute(ConfiguredService.kt:87)
	at io.gitlab.arturbosch.detekt.idea.DetektAnnotator.doAnnotate(DetektAnnotator.kt:30)
	at io.gitlab.arturbosch.detekt.idea.DetektAnnotator.doAnnotate(DetektAnnotator.kt:14)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:218)
	... 37 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'org.slf4j.ILoggerFactory org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()' the class loader com.intellij.ide.plugins.cl.PluginClassLoader @71d200b8 of the current class, org/slf4j/LoggerFactory, and the class loader com.intellij.util.lang.PathClassLoader @5d3411d for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature (org.slf4j.LoggerFactory is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @71d200b8, parent loader 'bootstrap'; org.slf4j.impl.StaticLoggerBinder is in unnamed module of loader com.intellij.util.lang.PathClassLoader @5d3411d)
	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:423)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
	at mu.KotlinLogging.logger(KotlinLogging.kt:32)
	at com.pinterest.ktlint.core.api.UsesEditorConfigPropertiesKt.<clinit>(UsesEditorConfigProperties.kt:11)
	at com.pinterest.ktlint.core.api.UsesEditorConfigProperties$DefaultImpls.getEditorConfigValue(UsesEditorConfigProperties.kt:84)
	at com.pinterest.ktlint.ruleset.standard.ParameterListWrappingRule.getEditorConfigValue(ParameterListWrappingRule.kt:39)
	at com.pinterest.ktlint.core.api.UsesEditorConfigProperties$DefaultImpls.getEditorConfigValue(UsesEditorConfigProperties.kt:44)
	at com.pinterest.ktlint.ruleset.standard.ParameterListWrappingRule.getEditorConfigValue(ParameterListWrappingRule.kt:39)
	at com.pinterest.ktlint.ruleset.standard.ParameterListWrappingRule.visit(ParameterListWrappingRule.kt:60)
	at io.gitlab.arturbosch.detekt.formatting.FormattingRule.apply(FormattingRule.kt:96)
	at io.gitlab.arturbosch.detekt.formatting.KtLintMultiRule$visit$2.invoke(KtLintMultiRule.kt:131)
	at io.gitlab.arturbosch.detekt.formatting.KtLintMultiRule$visit$2.invoke(KtLintMultiRule.kt:130)
	at io.gitlab.arturbosch.detekt.formatting.KtLintMultiRule.visitTokens(KtLintMultiRule.kt:158)
	at io.gitlab.arturbosch.detekt.formatting.KtLintMultiRule.visit(KtLintMultiRule.kt:130)
	at io.gitlab.arturbosch.detekt.api.BaseRule.visitFile(BaseRule.kt:46)
	at io.gitlab.arturbosch.detekt.core.Analyzer.analyze$executeRules(Analyzer.kt:122)
	at io.gitlab.arturbosch.detekt.core.Analyzer.analyze(Analyzer.kt:134)
	at io.gitlab.arturbosch.detekt.core.Analyzer.runSync(Analyzer.kt:69)
	... 54 more

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
DeMackcommented, May 11, 2022

I should probably add, since it might not be clear, that this prevents the plugin from working (i.e., nothing is annotated in the editor).

It’s not the optimal solution, but as a workaround until v1.21.0 I’ve found that by disabling the Enable formatting (ktlint) rules option will allow for the rest of the rules to run as expected.

0reactions
cortinicocommented, May 11, 2022

As of now, this will most likely be fixed in Detekt 1.21.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

CaptureResult - Android Developers
Once the new exposure target is reached, android.control.aeState will change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), ...
Read more >
What's New? | STK Components for Java 2022 r2 - Agi
This new constraint encompasses two underlying queries, a start query and a maintain query. This query will be considered satisfied after the start...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:165330 - "dev-java/sun-jdk-1.6.0-r1 error while loading shared libraries: libjli.so - /proc is not mounted" status:RESOLVED resolution:OBSOLETE ...
Read more >
Unblu 7 release notes
UNBLU-12507 - Unique constraint violation of device info PushKit token. UNBLU-12518 - Conversation loading forever on mobile SDK.
Read more >
Changelog Archive - Jenkins
(issue 68556); Show remote class loader statistics of agents with new table layout. ... Update the bundled Matrix Project Plugin from 1.18 to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found