-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Labels
bugSomething isn't workingSomething isn't working
Description
Affected version
4.0.0-rc-5
Bug description
I'm concatenating several org.apache.maven.api.di.Inject files using the AppendingTransformer of the Shade plugin. This transformer adds an empty line after each appended file. Maven DI treats empty lines as if they contained an empty class name, resulting in errors.
Stack trace:
mar 23, 2026 3:31:04 P. M. com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.ClassNotFoundException:
org.apache.maven.di.impl.DIException: Error while discovering DI classes from classLoader
at org.apache.maven.di.impl.InjectorImpl.discover(InjectorImpl.java:111)
at org.apache.maven.internal.impl.SisuDiBridgeModule.configure(SisuDiBridgeModule.java:87)
at com.google.inject.AbstractModule.configure(AbstractModule.java:66)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
at org.eclipse.sisu.space.QualifiedTypeBinder.installModule(QualifiedTypeBinder.java:153)
at org.eclipse.sisu.space.QualifiedTypeBinder.hear(QualifiedTypeBinder.java:119)
at org.eclipse.sisu.plexus.PlexusTypeBinder.hear(PlexusTypeBinder.java:57)
at org.eclipse.sisu.space.QualifiedTypeVisitor.leaveClass(QualifiedTypeVisitor.java:136)
at org.eclipse.sisu.plexus.PlexusTypeVisitor.leaveClass(PlexusTypeVisitor.java:119)
at org.eclipse.sisu.space.SpaceScanner$1.visitEnd(SpaceScanner.java:218)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:749)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
at org.eclipse.sisu.space.SpaceScanner.accept(SpaceScanner.java:143)
at org.eclipse.sisu.space.SpaceScanner.accept(SpaceScanner.java:109)
at org.eclipse.sisu.space.SpaceModule.scanForElements(SpaceModule.java:218)
at org.eclipse.sisu.space.SpaceModule.configure(SpaceModule.java:168)
at org.eclipse.sisu.plexus.PlexusAnnotatedBeanModule.configure(PlexusAnnotatedBeanModule.java:119)
at org.eclipse.sisu.plexus.PlexusBindingModule.configure(PlexusBindingModule.java:65)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
at com.google.inject.spi.Elements.getElements(Elements.java:108)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:77)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
at com.google.inject.spi.Elements.getElements(Elements.java:108)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:493)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:210)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.container(PlexusContainerCapsuleFactory.java:115)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.createContainerCapsule(PlexusContainerCapsuleFactory.java:81)
at org.apache.maven.cling.invoker.LookupInvoker.container(LookupInvoker.java:517)
at org.apache.maven.cling.invoker.LookupInvoker.doInvoke(LookupInvoker.java:158)
at org.apache.maven.cling.invoker.LookupInvoker.invoke(LookupInvoker.java:134)
at org.apache.maven.cling.ClingSupport.run(ClingSupport.java:76)
at org.apache.maven.cling.MavenCling.main(MavenCling.java:51)
at org.opendevstack.cmd.impl.build.maven.MavenCommand.buildEmbedded(MavenCommand.java:137)
at org.opendevstack.cmd.impl.build.maven.MavenCommand.build(MavenCommand.java:98)
at org.opendevstack.task.api.build.BaseBuildTask.execute(BaseBuildTask.java:63)
at org.opendevstack.task.api.BaseTask.call(BaseTask.java:67)
at org.opendevstack.task.api.BaseTask.call(BaseTask.java:35)
at picocli.CommandLine.executeUserObject(CommandLine.java:2031)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
at picocli.CommandLine.execute(CommandLine.java:2174)
at org.opendevstack.task.api.BaseTask.doLaunch(BaseTask.java:97)
at org.opendevstack.task.api.BaseTask.main(BaseTask.java:81)
Caused by: java.lang.ClassNotFoundException:
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:225)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:210)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:205)
at org.apache.maven.di.impl.InjectorImpl.discover(InjectorImpl.java:104)
... 52 more
[ERROR] Error executing Maven.
[ERROR] Unable to create injector, see the following errors:
1) An exception was caught and reported. Message: Error while discovering DI classes from classLoader
at ClassRealm[plexus.core, parent: null]
\_ installed by: PlexusBindingModule -> SisuDiBridgeModule
1 error
======================
Full classname legend:
======================
PlexusBindingModule: "org.eclipse.sisu.plexus.PlexusBindingModule"
SisuDiBridgeModule: "org.apache.maven.internal.impl.SisuDiBridgeModule"
========================
End of classname legend:
========================
[ERROR] Caused by: Error while discovering DI classes from classLoader
[ERROR] Caused by:
Please note that the last Caused by is empty because it shows the ClassNotFoundException message, which is empty since it's searching for an empty class name. The same happens in the "Caused by: java.lang.ClassNotFoundException:"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working