Testing with Spring Boot 2.7.0-RC1, I noticed that the spring-boot-dependencies is using Spring LDAP version 2.4.0-RC1. This seems to be overriding the version of JAXB declared in spring-boot-dependencies. Spring LDAP uses jakarta.xml.bind:jakarta.xml.bind-api:3.0.1 whereas Spring Boot requires jakarta.xml.bind:jakarta.xml.bind-api:2.3.3.

These different versions of JAXB use completely different java packages, jakarta.xml vs javax.xml which leads to CNF exceptions at runtime.

Comment From: wilkinsona

Thanks for the report. This will have to be addressed in Spring LDAP so I have opened https://github.com/spring-projects/spring-ldap/issues/639. If you are using Spring Boot's dependency management it should downgrade the versions automatically. That'll happen with Maven and with Gradle with the dependency management plugin. It would also happen with Gradle's built-in platform support as long as you declare an enforcedPlatform dependency on spring-boot-dependencies.