21:40:51.593 [RMI TCP Connection(3)-127.0.0.1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
21:40:51.701 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext
21:40:51.967 [RMI TCP Connection(3)-127.0.0.1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\kjc\springProject\kjc-spring-web\target\ROOT\WEB-INF\classes\kr\co\kjcSpringWeb\common\ApiInit.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\kjc\springProject\kjc-spring-web\target\ROOT\WEB-INF\classes\kr\co\kjcSpringWeb\common\ApiInit.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\kjc\springProject\kjc-spring-web\target\ROOT\WEB-INF\classes\kr\co\kjcSpringWeb\common\ApiInit.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
- Unsupported class file major version 61 : 컴파일한 class가 JDK 17 이상으로 컴파일 됌. JDK 17이상에서만 사용가능
- ContextLoader 가 실행되던 시점 bean생성에 실패한듯 하다
1. 프로젝트 세팅 확인 - 정상

2. module의 source Language Level 확인 - 정상

3. module의 Dependency 확인 - 정상

- 아무리 찾아봐도 JDK 17버전은 잘 적용되어있었으나
--------- 해결 방법 1 ----------
- 스프링 버전을 올리면서 Web resource 디렉토리가 초기화됐나보다
- 내 프로젝트 root-Context.xml과 servlet-Context.xml은 WEB-INF/spring에 위치해 있었다.
- 다시 WEB-INF찾도록 변경

--------- 해결 방법 2 ----------
- spring frameWork 라이브러리가 2개가 있었다.
- maven 종속 lib랑, 직접 다운받은 lib가 중복되서 일어난 것 같다.
- maven 종속 lib가 인식되도록 다운받은 lib는 삭제처리 후 성공...
- 장장 2일에 걸려 해결했다..
'SPRING' 카테고리의 다른 글
Mongo DB - 다중 Config 설정 (0) | 2024.03.20 |
---|---|
spring boot Gradle 버전 이슈 (0) | 2022.12.13 |
mybatis-config 설정 오류 (0) | 2022.12.11 |
sqlSessionFactory location 못찾는 이슈 (0) | 2022.12.11 |
Spring - @Transactional (0) | 2022.10.11 |