Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- filterexpression
- 도메인
- Springsecurity
- Spring
- 스프링테스트
- partiql
- 다이나모디비
- MockMvc
- 테스트코드
- compositekey
- query
- awscloud
- secondaryindex
- 개발
- awscli
- markerinterface
- DynamoDB
- annotation
- 자바스프링
- testresttemplate
- AWS
- 로드밸런서
- EmbeddedId
- javaspring
- Route53
- 자바
- Java
- 오류
- IdClass
- 스프링
Archives
- Today
- Total
아장아장 개발 일기
failed to instantiate com.fasterxml.jackson.datatype.jsr310.javatimemodule 에러 원인과 해결 방법 본문
개발/Spring
failed to instantiate com.fasterxml.jackson.datatype.jsr310.javatimemodule 에러 원인과 해결 방법
빨간머리 마녀 🍒 2022. 11. 3. 10:24에러내용
아래의 에러메세지가 뜨며 프로그램 실행에 실패했다.
org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Unresolvable class definition; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ser/std/ToStringSerializerBase
at org.springframework.beans.BeanUtils.instantiateClass (BeanUtils.java:149)
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable (Jackson2ObjectMapperBuilder.java:805)
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.configure (Jackson2ObjectMapperBuilder.java:669)
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build (Jackson2ObjectMapperBuilder.java:652)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init> (MappingJackson2HttpMessageConverter.java:59)
at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.<init> (AllEncompassingFormHttpMessageConverter.java:76)
at org.springframework.web.client.RestTemplate.<init> (RestTemplate.java:147)
원인
위의 메세지를 구글링 해보니 jackson-datatype 라이브러리의 버전이 안맞아 생기는 오류로 파악되었다.
해결 방법
build.gradle 의존성 주입에 사용된 기존 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' 라이브러리를 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8'로 변경하니 정상적으로 프로그램이 실행되었다!
참고
https://github.com/FasterXML/jackson-modules-java8/issues/101
'개발 > Spring' 카테고리의 다른 글
Spring JSESSIONID를 통한 유저 구분 및 테스트 코드 (0) | 2022.11.30 |
---|---|
@NotNull VS @NotEmpty VS @NotBlank 어노테이션 비교 (0) | 2022.11.23 |
Jar 파일 PathNotFound 오류 해결 방법 (0) | 2022.10.21 |
@Component VS @Service VS @Repository 어노테이션 차이 (0) | 2022.08.18 |
Spring Security ‘hasAnyAuthority()’ VS ‘hasAnyRole()’ (0) | 2022.04.21 |
Comments