-
-
Couldn't load subscription status.
- Fork 84
Description
Hello,
I am using bundle com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider in an OSGi environment. The first thing I got was this exception:
java.lang.ClassNotFoundException: com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector cannot be found by com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider_2.6.3
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospector(JsonMapperConfigurator.java:109)
The bundle com.fasterxml.jackson.module.jackson-module-jaxb-annotations was active, but not visible by the class loader of the first bundle.
My workaround was a fragment bundle. However, my suggestion here is to make the first bundle depend optionally on the other:
Require-Bundle: com.fasterxml.jackson.module.jackson-module-jaxb-annotations;bundle-version="2.6.3";resolution:=optional
Thanks for the good work,
Björn