In my POM I upgraded the version of Spring Boot from 2.3.5.RELEASE to 2.4.2. As a result, mvn clean test
now fails with error
java.lang.NoClassDefFoundError: org/springframework/test/context/TestContextAnnotationUtils
Caused by: java.lang.ClassNotFoundException: org.springframework.test.context.TestContextAnnotationUtils
on a test that consists simply in
package ch.ge.ael.enu.mediation;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MediationApplicationTests {
@Test
void contextLoads() {
}
}
Does anyone have a clue?
What resolved this issue for me was upgrading my spring-test
dependency version from 5.2.9.RELEASE
to 5.3.8
Marten Deinum's comment was correct : a dependency created havoc among the Spring JARs' versions. With Camel 3.6.0, Spring Boot 2.3.5.RELEASE was OK but Spring Boot 2.4.2 was not. Upgrading Camel to 3.7.1 did the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With