Hi.

Application can not start after upgrading to spring boot 3.0 when classpath contains com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.1 becasue of can not find javax.xml. The gradle depencency report highlits this issue: SpringBoot jackson-module-jaxb-annotations is not compatible with spring boot 3.0 The problem occurs when Jackson's ObjectMapper registers modules:

java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
    at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:137)
    at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:124)
    at com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.setupModule(JaxbAnnotationModule.java:98)
    at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:879)
    at com.fasterxml.jackson.databind.ObjectMapper.registerModules(ObjectMapper.java:1081)
    at com.fasterxml.jackson.databind.ObjectMapper.findAndRegisterModules(ObjectMapper.java:1165)

Comment From: m1ngyuan

You can add dependencies, which may solve your problems <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId> </dependency>

Comment From: bclozel

As pointed out by @m1ngyuan , "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations" is already managed here through the jackson-bom. I guess this is part of the Jakarta migration story that we point to in our migration guide.

Maybe this Jackson dependency is popular enough that we could mention it directly in our migration guide, but we can hardly list them all. Does @m1ngyuan 's suggestion work for you here @lex-em ?

Comment From: lex-em

@m1ngyuan com.fasterxml.jackson.module:jackson-module-jaxb-annotations is already in classpath and it breaks runtime because it depends on jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 with javax.xml package, but spring boot depends on jakarta.xml.bind:jakarta.xml.bind-api:4.0.0 with jakarta.xml package.

It seems com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.1 is not ready to use with spring boot 3.0

Comment From: lex-em

@bclozel i do not think that com.fasterxml.jackson.module:jackson-module-jaxb-annotations so popular, but it used in some cases in projects and libraries. I do not sure that it is jackson issue, because it have com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations. On other hand com.fasterxml.jackson.module:jackson-module-jaxb-annotations come from com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider

Comment From: bclozel

@lex-em I guess the dependencies of your application must be revisted with this Jakarta migration mind. "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider" is probably the one to use now.

Comment From: lex-em

@bclozel thnx, I will go to maintainers of library, that used com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider, with this suggestion

Comment From: bclozel

OK I don't think there's so much we can do here, it's really about moving the entire ecosystem to Java 17 and Jakarta EE 9+. Hopefully this baseline change will nudge the community in the right direction! Thanks for reaching out!