Inteliji idea failed to compile code although mvn run successfully
when opening a mvn project which passed mvn clean install command successfully the Inteliji idea failed to compile the code and no mvn dependency is fetched (due to it, it failed to recognize familiar class such as javax.inject).
in the idea log I got the following error
Error injecting: private ComponentBomGenerator ComponentBomGeneratorLifecycleParticipant.executionListener
while locating ComponentBomGeneratorLifecycleParticipant
at ClassRealm[extension>xxx.maven.plugins:component-bom-generator:1.0.162, parent: Launcher$AppClassLoader@4aa298b7]
\_ installed by: WireModule -> PlexusBindingModule
while locating AbstractMavenLifecycleParticipant
[ERROR] Maven server structure problem
my project parent pom includes and extension under the build which the root cause of the problem, once I have removed it solved.
<build>
<extensions>
<extension>
<groupId>xxx.maven.plugins</groupId>
<artifactId>component-bom-generator</artifactId>
<version>${version.xxx.plugins}</version>
</extension>
notice this plugin artifact exist in the nexus and after I have remove the artifact from the pom and re-build the project successfully, I have re-added the artifacts plug-in and then it is still working fine.
I don't think an extension under the build should break the dependency tree and I don't understand why it is failing, error is not clear enough. it is saying “Maven server structure problem” but it's not saying what is the problem and I doubt there is actually a problem since maven is able to build it.
I am using IntelliJ IDEA 2024.1.1 (Ultimate Edition)
Build #IU-241.15989.150, built on April 29, 2024
Thank you
请先登录再写评论。
Hello!
Thank you for reporting this!
To investigate and resolve this, could you please:
1. via the menu → Build -< Build Project
3. Sorry, I can't share the project
see full log
com.thoughtworks.xstream:xstream:1.4.7 (#1 class roots, #0 source roots)", "Library Maven: org.glassfish.jersey.core:jersey-client:2.27 (#1 class roots, #0 source roots)" with On refresh of files in digital-impl-ces-9]
2024-05-06 12:29:56,890 [ 781062] INFO - #c.i.u.i.c.IndexUpdateRunner - Using 3 indexing and 4 writing threads for indexing
2024-05-06 12:30:03,018 [ 787190] INFO - #c.i.u.i.ProjectChangedFilesScanner - Retrieving changed during indexing files of digital-impl-ces-9 : 0 to update, calculated in 0ms
2024-05-06 12:30:03,041 [ 787213] INFO - #c.i.u.i.UnindexedFilesIndexer - Finished for digital-impl-ces-9. Unindexed files update took 6151ms; general responsiveness: ok; EDT responsiveness: ok
2024-05-06 12:30:03,043 [ 787215] INFO - #c.i.o.p.MergingQueueGuiExecutor - Task finished: (dumb mode task) UnindexedFilesIndexer[digital-impl-ces-9, 1 iterators, reason: Merged changes in: "Module 'digital-impl-ces-9' (all roots)", "JDK 1.8 C:/APS/jdk/jdk1.8.0_66", "Library Maven: com.xxx.core.acpe:acpe-portfolio-project:10.1.0.10.390 (#1 class roots, #0 source roots)", "Library Maven: com.xxx.repo:rp-simulator:10.1.0.0.5232 (#1 class roots, #0 source roots)", "Library Maven: com.thoughtworks.xstream:xstream:1.4.7 (#1 class roots, #0 source roots)", "Library Maven: org.glassfish.jersey.core:jersey-client:2.27 (#1 class roots, #0 source roots)" with On refresh of files in digital-impl-ces-9]
2024-05-06 12:30:03,045 [ 787217] INFO - #c.i.o.p.DumbServiceImpl - exit dumb mode [digital-impl-ces-9]
2024-05-06 12:30:10,504 [ 794676] WARN - #c.i.i.a.s.WaitForContributorsListenerWrapper - Contributor 'ClassSearchEverywhereContributor' did not finish search for 'im' in 2000ms. Maybe it should implement PossibleSlowContributor interface?
2024-05-06 12:30:14,052 [ 798224] INFO - #c.j.r.p.c.CodeWithMeCleanup - running activity to cleanup old thin clients... Root path is 'C:\Users\inbalg\AppData\Local\JetBrains'. JvmStartTimeMs=1714987015000
2024-05-06 12:30:14,053 [ 798225] INFO - #c.j.r.p.c.CodeWithMeCleanup - found 0 Code With Me client system folders to check
2024-05-06 12:30:14,053 [ 798225] INFO - #c.j.r.p.c.CodeWithMeCleanup - found 0 Code With Me client config folders to check
2024-05-06 12:30:14,054 [ 798226] INFO - #c.j.r.p.c.CodeWithMeCleanup - keep only [] major versions
2024-05-06 12:30:14,054 [ 798226] INFO - #c.j.r.p.c.CodeWithMeCleanup - Starting the logs folder cleanup. Path: C:\Users\inbalg\AppData\Local\JetBrains\IntelliJIdea2024.1\log
2024-05-06 12:30:14,054 [ 798226] INFO - #c.i.r.OsRegistryConfigProvider - Looking for 'versionManagementEnabled' value in [HKLM_64\SOFTWARE\JetBrains\JetBrainsClient\versionManagementEnabled, HKLM_32\SOFTWARE\JetBrains\JetBrainsClient\versionManagementEnabled, HKCU_64\SOFTWARE\JetBrains\JetBrainsClient\versionManagementEnabled, HKCU_32\SOFTWARE\JetBrains\JetBrainsClient\versionManagementEnabled]
2024-05-06 12:30:14,054 [ 798226] INFO - #c.i.r.OsRegistryConfigProvider - OS provided value for 'versionManagementEnabled' is not found
2024-05-06 12:30:26,933 [ 811105] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction - `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: CMD Support]
com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: CMD Support]
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)
2024-05-06 12:30:26,933 [ 811105] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction - `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: CMD Support]
com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: CMD Support]
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)
2024-05-06 12:30:26,957 [ 811129] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction - IntelliJ IDEA 2024.1 Build #IU-241.14494.240
2024-05-06 12:30:26,957 [ 811129] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction - IntelliJ IDEA 2024.1 Build #IU-241.14494.240
2024-05-06 12:30:26,958 [ 811130] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction - JDK: 17.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-05-06 12:30:26,958 [ 811130] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction - OS: Windows 10
2024-05-06 12:30:26,958 [ 811130] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdScriptAction - Plugin to blame: CMD Support version: 1.0.5
2024-05-06 12:30:26,959 [ 811131] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction - JDK: 17.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-05-06 12:30:26,959 [ 811131] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction - OS: Windows 10
2024-05-06 12:30:26,959 [ 811131] SEVERE - #ua.t3hnar.plugins.cmdsupport.actions.RunCmdShellAction - Plugin to blame: CMD Support version: 1.0.5
2024-05-06 12:30:27,033 [ 811205] INFO - #c.i.c.ComponentStoreImpl - Registering unknown macros a.b.c in component DatabaseSettings
2024-05-06 12:30:28,036 [ 812208] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,040 [ 812212] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,043 [ 812215] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,050 [ 812222] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,067 [ 812239] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,069 [ 812241] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,070 [ 812242] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:28,075 [ 812247] INFO - #c.i.d.d.a.DatabaseArtifactList - skipping constraint
2024-05-06 12:30:37,027 [ 821199] INFO - #o.j.i.maven - com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting: private ComponentBomGenerator ComponentBomGeneratorLifecycleParticipant.executionListener
while locating ComponentBomGeneratorLifecycleParticipant
at ClassRealm[extension>xxx.maven.plugins:component-bom-generator:1.0.162, parent: Launcher$AppClassLoader@4aa298b7]
\_ installed by: WireModule -> PlexusBindingModule
while locating AbstractMavenLifecycleParticipant
1 error
======================
Full classname legend:
======================
AbstractMavenLifecycleParticipant: "org.apache.maven.AbstractMavenLifecycleParticipant"
ComponentBomGenerator: "com.xxx.maven.plugins.ComponentBomGenerator"
ComponentBomGeneratorLifecycleParticipant: "com.xxx.maven.plugins.ComponentBomGeneratorLifecycleParticipant"
Launcher$AppClassLoader: "sun.misc.Launcher$AppClassLoader"
PlexusBindingModule: "org.eclipse.sisu.plexus.PlexusBindingModule"
WireModule: "org.eclipse.sisu.wire.WireModule"
========================
End of classname legend:
========================
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1104)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.eclipse.sisu.wire.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:111)
at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
at org.jetbrains.idea.maven.server.utils.Maven3XProjectResolver.getLifecycleParticipants(Maven3XProjectResolver.java:560)
at org.jetbrains.idea.maven.server.utils.Maven3XProjectResolver.loadExtensions(Maven3XProjectResolver.java:376)
at org.jetbrains.idea.maven.server.utils.Maven3XProjectResolver.lambda$doResolveProject$9(Maven3XProjectResolver.java:189)
at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.executeWithSessionScope(Maven3ServerEmbedder.java:190)
at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.executeWithMavenSession(Maven3ServerEmbedder.java:133)
at org.jetbrains.idea.maven.server.utils.Maven3XProjectResolver.doResolveProject(Maven3XProjectResolver.java:129)
at org.jetbrains.idea.maven.server.utils.Maven3XProjectResolver.lambda$resolveProjects$0(Maven3XProjectResolver.java:86)
at com.intellij.maven.server.telemetry.MavenServerOpenTelemetryImpl.callWithSpan(MavenServerOpenTelemetry.java:111)
at org.jetbrains.idea.maven.server.utils.Maven3XProjectResolver.resolveProjects(Maven3XProjectResolver.java:86)
at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.lambda$resolveProjects$0(Maven3XServerEmbedder.java:528)
at com.intellij.maven.server.telemetry.MavenServerOpenTelemetryImpl.callWithSpan(MavenServerOpenTelemetry.java:111)
at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.resolveProjects(Maven3XServerEmbedder.java:527)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Can not set com.xxx.maven.plugins.ComponentBomGenerator field com.xxx.maven.plugins.ComponentBomGeneratorLifecycleParticipant.executionListener to com.xxx.maven.plugins.ComponentBomGenerator
Thank you for sharing the details!
I've created YouTrack Issue IDEA-353133 for this.
Developers are highly interested in looking further into this, would you be able to share a reproducer Project?
It does not have to be the actual Project you're working on, you can put together a small Project with minimal code, as long as it exhibits this behavior - we can use it.
If reproducer cannot be created/shared, could you share the extension instead or provide as much information as possible on the extension's functionality and workflow.