728x90
반응형
클래스를 삭제하고 서버를 빌드할때 아래와 같은 에러가 발생하였습니다.
org.springframework.beans.factory.BeanDefinitionStoreException: I/O failure while processing configuration class [최상단클래스경로]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:251) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:197) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:165) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:417) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:290) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.1.jar:3.3.1]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.1.jar:3.3.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.1.jar:3.3.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-3.3.1.jar:3.3.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) ~[spring-boot-3.3.1.jar:3.3.1]
at lab.삭제한클래스경로.main(삭제한클래스명.java:10) ~[classes/:na]
Caused by: java.io.FileNotFoundException: class path resource [삭제한클래스경로] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:215) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:54) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:48) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86) ~[spring-boot-3.3.1.jar:3.3.1]
at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73) ~[spring-boot-3.3.1.jar:3.3.1]
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:314) ~[spring-context-6.1.10.jar:6.1.10]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:246) ~[spring-context-6.1.10.jar:6.1.10]
... 14 common frames omitted
해당 에러는 삭제한 클래스를 찾아서 발생하는 에러 입니다.
gradle clean, invalidate caches를 해봐도 동일한 에러가 발생하였습니다.
그래서 클래스 파일이 생성되는 폴더(ex out폴더)에서 production 폴더를 삭제 후 다시 프로젝트를 빌드하니 production 폴더가 다시 생기고 삭제한 클래스가 다시 생기지 않아서 정상 빌드 되었습니다.
728x90
반응형
'개발 > spring, spring boot' 카테고리의 다른 글
@Bean 객체 이름 설정 (0) | 2024.11.19 |
---|---|
Kotlin을 사용한 sitemap.xml 자동 생성 방법 (Spring Boot) (1) | 2024.09.05 |
[Java] [Gradle] Your build is currently configured to use Java 21 and Gradle 7.6.1. 에러 수정 (0) | 2024.07.17 |
Spring Boot 의존성 확인 방법 (0) | 2024.07.02 |
[Spring integration] TCP 연결 끊김 처리, connectionId (0) | 2024.06.25 |