eclipse-ee4j / eclipse-ee4j/jersey
Issue with JacksonFeature and osgi
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm not sure if this is a bug or I configured something wrong ?
I use jersey in an osgi (karaf 4.2.9) environment with java 8.
I updated jersey from 2.30.1 to 2.31 and jackson from 2.11.0 to 2.11.2.
After update we receive the following exception:
org.glassfish.hk2.api.MultiException: A MultiException has 2 exceptions. They are:
1. java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule not found
2. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.jackson.internal.DefaultJacksonJaxbJsonProvider
I think this depends on the feature [PULL 4447](https://github.com/eclipse-ee4j/jersey/pull/4447)
The setup looks like:
```
public static final class Configuration extends ResourceConfig
{
public Configuration()
{
property(FEATURE_AUTO_DISCOVERY_DISABLE, true);
property(METAINF_SERVICES_LOOKUP_DISABLE, true);
register(ExceptionMapper.class);
register(ObjectMapperProvider.class);
register(JacksonFeature.class);
```
Thanks and Regards
Contributor guide
Research direction
Start with the Configuration snippet and JacksonFeature registration, then compare the Jersey 2.30.1-to-2.31 change associated with pull request 4447. Reproduce the failure in Karaf 4.2.9 with Java 8 and the stated Jackson versions; done means the JaxbAnnotationModule service-loading error no longer prevents DefaultJacksonJaxbJsonProvider creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100