nexus-repository-composer icon indicating copy to clipboard operation
nexus-repository-composer copied to clipboard

Exception (com.google.inject.CreationException) while activating nexus-repository-composer for Nexus v3.62.0-01

Open BM-MD opened this issue 1 year ago • 1 comments

  • What are you trying to do?

We have tried to install the plugin (v0.0.29) via (most) Permanent Install in our Nexus environment (v3.62.0-01). We used the .jar file available at The Central Repository.

Unfortunately, every time we restart Nexus, we get the following error in the log:

2023-12-12 02:30:23,692+0100 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.extender.NexusBundleTracker - ACTIVATING org.sonatype.nexus.plugins.nexus-repository-composer [0.0.29]
2023-12-12 02:30:23,711+0100 WARN  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.extender.NexusBundleTracker - BROKEN org.sonatype.nexus.plugins.nexus-repository-composer [0.0.29]
2023-12-12 02:30:23,730+0100 ERROR [FelixStartLevel]  *SYSTEM Felix - Bundle org.sonatype.nexus.extender [96] EventDispatcher: Error during dispatch. (com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/MissingImplementation]: No implementation for ComposerJsonProcessor annotated with interface TypeArguments$Implicit was bound.

Did you mean?
	* ComposerJsonProcessor bound at LocatorWiring

Requested by:
1  : LocatorWiring

Learn more:
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION

1 error

======================
Full classname legend:
======================
ComposerJsonProcessor:  "org.sonatype.nexus.repository.composer.internal.ComposerJsonProcessor"
LocatorWiring:          "org.eclipse.sisu.wire.LocatorWiring"
TypeArguments$Implicit: "org.eclipse.sisu.inject.TypeArguments$Implicit"
========================
End of classname legend:
========================
)
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/MissingImplementation]: No implementation for ComposerJsonProcessor annotated with interface TypeArguments$Implicit was bound.

Did you mean?
	* ComposerJsonProcessor bound at LocatorWiring

Requested by:
1  : LocatorWiring

Learn more:
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION

1 error

======================
Full classname legend:
======================
ComposerJsonProcessor:  "org.sonatype.nexus.repository.composer.internal.ComposerJsonProcessor"
LocatorWiring:          "org.eclipse.sisu.wire.LocatorWiring"
TypeArguments$Implicit: "org.eclipse.sisu.inject.TypeArguments$Implicit"
========================
End of classname legend:
========================

		at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:589)
		at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163)
		at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
		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.eclipse.sisu.launch.SisuBundlePlan.inject(SisuBundlePlan.java:78)
		at org.eclipse.sisu.launch.SisuBundlePlan.prepare(SisuBundlePlan.java:50)
		at org.eclipse.sisu.launch.SisuTracker.prepare(SisuTracker.java:186)
		at org.sonatype.nexus.extender.NexusBundleTracker.prepare(NexusBundleTracker.java:69)
		at org.eclipse.sisu.launch.SisuTracker.addingBundle(SisuTracker.java:129)
		at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
		at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:420)
		at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
		at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
		at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
		at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
		at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
		at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
		at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817)
		at org.apache.felix.framework.Felix.activateBundle(Felix.java:2393)
		at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
		at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
		at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
		at java.lang.Thread.run(Thread.java:750)

Any thoughts on this?

  • What feature or behavior is this required for?

Activation/Use of the plugin.

BM-MD avatar Dec 13 '23 13:12 BM-MD

I have no problems running the plugin (v0.0.29) with Nexus v3.62.0 on my side. The only difference between us is that you use a jar, whereas I install via the kar.

I'd recommand you to use the kar installation, which is now recommended by Nexus, and much simpler than the jar installation ;) (PS: the kar file contains the jar with all its dependencies and a config use by Nexus to load the plugin)

Just download it here : nexus-repository-composer-0.0.29-bundle.kar Then put it in the deploy folder of your Nexus installation. And that's all ! No more xml to modify !

jcolfej avatar Feb 02 '24 14:02 jcolfej