org.springframework.context.support.AbstractApplicationContext prepareRefresh 정보: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4fe3c938: startup date [Fri Jul 11 17:54:44 KST 2025]; root of context hierarchy Exception in thread "main" java.lang.IllegalStateException: Cannot load configuration class: config.AppCtx at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:416) at
(생략)
org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122) at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110) at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:405) ... 7 more Caused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3439f68d at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464) at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336) at
(생략)
te(KeyFactory.java:153) at org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73) ... 10 more Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws
(생략)
스프링 실행이 안 될 때:
스프링 버전에 비해 자바 버전이 높아서 그런 거니 스프링 5-자바 버전 8 이하로 맞추자..
(이하 GPT)
- Java 9 이후부터 도입된 모듈 시스템 (JPMS) 이 java.lang.ClassLoader.defineClass() 메서드 접근을 막고 있어서,
- Spring 내부에서 사용하는 CGLIB (클래스를 동적으로 프록시로 생성하는 도구)가 동작할 수 없는 거예요.
'ERROR' 카테고리의 다른 글
[VSCode] Use 'const' with the constructor to improve performance. (0) | 2024.08.22 |
---|---|
AttributeError: 'NllbTokenizerFast' object has no attribute 'lang_code_to_id' (0) | 2024.07.21 |
textarea 태그 닫기 (0) | 2024.07.01 |
input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. (2) | 2024.05.26 |
visual studio에서 실행 시 콘솔 창이 뜨지 않는 경우 (1) | 2024.04.03 |