You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dropwizard-user
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.
Tatu Saloranta
unread,
Apr 14, 2023, 2:24:42 PM4/14/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dropwiz...@googlegroups.com
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