question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jackson bundles are missing OSGi's osgi.serviceloader metadata

See original GitHub issue

Bundles need to include extra metadata to support java.util.ServiceLoader inside an OSGi framework. Jackson’s bundles are all missing this metadata.

In theory, it should just be a matter of applying Bnd’s @ServiceConsumer and @ServiceProvider annotations in the correct places as described here, where these annotations can be provided like this:

diff --git a/base/pom.xml b/base/pom.xml
index 6235a67..4972957 100644
--- a/base/pom.xml
+++ b/base/pom.xml
@@ -30,9 +30,17 @@ of Jackson: application code should only rely on `jackson-bom`
          parent pom, and then also allow override as need be
       -->
     <jackson-bom.version>${project.parent.version}</jackson-bom.version>
+
+    <version.bnd.annotation>6.3.1</version.bnd.annotation>
   </properties>
 
   <dependencies>
+    <dependency>
+      <groupId>biz.aQute.bnd</groupId>
+      <artifactId>biz.aQute.bnd.annotation</artifactId>
+      <version>${version.bnd.annotation}</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency> <!-- all components use junit for testing -->
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>

I am struggling to wrap my head around your myriad of separate repositories, and so you may have a better way of providing this dependency.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
cowtowncodercommented, Oct 18, 2022

Ok good, thank you for confirming @rakeshk15.

1reaction
chrisr3commented, Oct 17, 2022

This change will require the Aries SPIFly bundle and the jackson-core bundle will not resolve wherever Aries SPIFly bundle is missing.

The solution to that is to make the requirement optional, as has already been done with Woodstox. I’m sorry, I thought we already knew this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

133 Service Loader Mediator Specification - OSGi Docs
Consumer - A class that uses the Java SE Service Loader inside an OSGi framework. Mediator - An extender that mediates between Consumer...
Read more >
In OSGi, ServiceLoader.load fails to find an implementation
It is org.openstack4j.core.transport.HttpExecutorService that require the SPIFly weaving. One quirk: both bundles are loaded from a zip file and ...
Read more >
Bnd, ServiceLoader and javax.xml.stream.FactoryFinder
XMLInputFactory)';osgi.serviceloader='javax.xml.stream. ... Jackson's bundles are all missing the @ServiceProvider annotations for their ...
Read more >
Solved: Using plain groovy console in vault-upgrade-hook
Solved: Hi, I am trying to use vault upgrade hook with plain groovy (not groovy console) to work with latest AEM as a...
Read more >
LuciadFusion Release notes - Luciad Developer Platform
GXY hypsometry layers now correctly process missing or unknown data for earth tile ... The ISO metadata of Studio's services now includes the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found