On Fri, Apr 14, 2023 at 4:23 AM Jonathan Olsson <[email protected]> wrote: > > Hi! > > I'm enjoying my time upgrading from DW 2.1.5 to DW 4.0.0 and am having some > issues related to the Jackson dependency. DW 4.0.0 uses jackson 2.14.2. The > JacksonJaxbJsonProvider still uses javax.ws.rs and not jakarta leading to > some issues with the following snipppet: > > val om = Json.configureObjectMapper(environment.objectMapper) > val jsonProvider = JacksonJaxbJsonProvider() > jsonProvider.setMapper(om) > > When compiling I get the following error when trying to setMapper: > > e: file:///... Cannot access 'javax.ws.rs.ext.MessageBodyReader' which is a > supertype of 'com.fasterxml.jackson.jaxrs.base.ProviderBase'. Check your > module classpath for missing or conflicting dependencies > > Any way to get around this besides pulling in old javax dependencies? > > Thankful for any help.
Due to the Hot Mess that the Javax-to-Jakarta transformation is, Jackson provides separate sets of things for 2. Old Javax-variants have a consistent set of dependencies and will not be changed to use Jakarta. What you need is new provider from https://github.com/FasterXML/jackson-jakarta-rs-providers/ (package `jackson-jakarta-rs-json-provider`; and provider class `JacksonXmlBindJsonProvider` if wanting to use JAXB-ish annotations; otherwise `JacksonJsonProvider`). Since this is through DropWizard, not sure if you need to do anything else -+ Tatu +- > > -- > You received this message because you are subscribed to the Google Groups > "dropwizard-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dropwizard-user/2936ef6b-1e62-45ff-b178-f4ab71dee6c5n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/CAGrxA26FcRWURn-CR6z4p6bM8XXg9g%3DUFZCnuCCMGNEzEr%3DbLA%40mail.gmail.com.
