"Resource has no uri" Karaf Exception When Loading Multiple Kar Bundles

Hi Everyone!

I’m running into a strange issue as I work to install a couple of custom plugins into the a NRM 3.20.0 instance running in Docker (specially the sonatype/nexus3 image). Following the approach outlined in Installing Bundles, I can successfully install my first Kar manifest with no issues. Once I attempt to copy over my second Kar, I encounter the following:

nexus_1  | 2020-01-17 06:48:08,825+0000 WARN  [fileinstall-/opt/sonatype/nexus/deploy] *SYSTEM org.apache.karaf.kar.internal.KarServiceImpl - Unable to install Kar feature nexus-blobstore-internal-custom/0.0.1
nexus_1  | java.lang.IllegalStateException: Resource has no uri
nexus_1  | 	at org.apache.karaf.features.internal.service.Deployer.getBundleInputStream(Deployer.java:1633)
nexus_1  | 	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:898)
nexus_1  | 	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
nexus_1  | 	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
nexus_1  | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
nexus_1  | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
nexus_1  | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
nexus_1  | 	at java.lang.Thread.run(Thread.java:748)

My understanding is that plugins/bundles loaded under /opt/sonatype/nexus/deploy are picked up by the running Karaf instance; however, attempting to load more than one consistently results in this exception.

I’ve been poking at this for far too long thinking that I may be missing something in my Pom file; however, things are quite similar to the built-in nexus-blobstore-s3 I’m referencing. I feel like this is a Karaf-ism that I do not understand.

A workaround is to update the nexus/assemblies/nexus-core-feature manifest and inject the plugin as a “core feature” bypassing Karaf; however, that seems dirty and I would really like to better understand the issue being experienced.

Any thoughts? Is there any additional information that would help in diagnosing this?