PicoContainer exceptions when using 2020.1

Answered

I've been working for the last couple of days on trying to update my plugin to work with the 2020.1 EAP. When executing my tests, I'm getting an error, the stacktrace is below. I don't get these errors on 2019.3 or any previous version. What might be going wrong here?

#com.intellij.openapi.project.impl.ProjectManagerImpl  - Key class cursive.build.maven.MavenRepositoriesHolder duplicated
     [java] org.picocontainer.PicoRegistrationException: Key class cursive.build.maven.MavenRepositoriesHolder duplicated
     [java] at com.intellij.util.pico.DefaultPicoContainer.registerComponent(DefaultPicoContainer.java:119)
     [java] at com.intellij.serviceContainer.PlatformComponentManagerImpl.registerComponent(PlatformComponentManagerImpl.kt:263)
     [java] at com.intellij.serviceContainer.PlatformComponentManagerImpl.registerComponents(PlatformComponentManagerImpl.kt:153)
     [java] at com.intellij.serviceContainer.PlatformComponentManagerImpl.registerComponents(PlatformComponentManagerImpl.kt:116)
     [java] at com.intellij.openapi.project.ProjectLoadHelper$Companion.registerComponents(projectLoader.kt:29)
     [java] at com.intellij.openapi.project.ProjectLoadHelper.registerComponents(projectLoader.kt)
     [java] at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:311)
     [java] at com.intellij.openapi.project.impl.ProjectManagerImpl.newProject(ProjectManagerImpl.java:214)
     [java] at com.intellij.testFramework.HeavyPlatformTestCase.createProject(HeavyPlatformTestCase.java:295)
     [java] at com.intellij.testFramework.LightPlatformTestCase.initProject(LightPlatformTestCase.java:194)
     [java] at com.intellij.testFramework.LightPlatformTestCase.doSetup(LightPlatformTestCase.java:275)
     [java] at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:39)
     [java] at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.lambda$setUp$27(CodeInsightTestFixtureImpl.java:1177)
     [java] at com.intellij.testFramework.EdtTestUtil$Companion$runInEdtAndWait$1.invoke(EdtTestUtil.kt:18)
     [java] at com.intellij.testFramework.EdtTestUtil$Companion$runInEdtAndWait$1.invoke(EdtTestUtil.kt:13)
     [java] at com.intellij.testFramework.EdtTestUtilKt$runInEdtAndWait$1.run(EdtTestUtil.kt:50)
     [java] at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:192)
     [java] at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:154)
     [java] at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:467)
     [java] at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:443)
     [java] at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:420)
     [java] at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
     [java] at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
     [java] at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
     [java] at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
     [java] at java.base/java.security.AccessController.doPrivileged(Native Method)
     [java] at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
     [java] at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
     [java] at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:933)
     [java] at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:806)
     [java] at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:433)
     [java] at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:713)
     [java] at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:432)
     [java] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
     [java] at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
     [java] at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
     [java] at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
     [java] at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
     [java] at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

 

3 comments
Comment actions Permalink

Multiple declarations of components with interface class "cursive.build.maven.MavenRepositoriesHolder" in your plugin.xml file(s)?

0
Comment actions Permalink

No, there's only one:

This code worked fine under 2019.3. I had to make a couple of changes for 2020.1 API compatibility, but nothing that should affect this. Have there been changes to how IntelliJ uses PicoContainer, perhaps related to loading plugins without restart?

0

Please sign in to leave a comment.