0
votes

Test set: com.example.demo.DemoApplicationTests

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.412 s <<< FAILURE! - in com.example.demo.DemoApplicationTests contextLoads(com.example.demo.DemoApplicationTests) Time elapsed: 0 s <<< ERROR! java.lang.IllegalStateException: Failed to load ApplicationContext Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.databind.ObjectMapper]: Factory method 'jacksonObjectMapper' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.ObjectMapper Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.databind.ObjectMapper]: Factory method 'jacksonObjectMapper' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.ObjectMapper Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.ObjectMapper

1
post your application class - Ganesh Gudghe

1 Answers

0
votes

Rebuild your project after adding the fasterxml library. And make sure that it is downloaded by whatever the build tool you are using after the build is complete. Check the External Libraries. It should contain the fasterxml. If not, check why it's not being downloaded or add it manually to the classpath