인프런 커뮤니티 질문&답변

gmldnjs0402님의 프로필 이미지
gmldnjs0402

작성한 질문수

스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술

Hello 서블릿

프로그램 실행 에러메시지

작성

·

1.1K

·

수정됨

0

서버실행할때 콘솔에 이런 에러가 남습니다. 왜 남는지 알려주세요ㅜㅜ

 

코딩화면입니다.

 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.

2023-03-19T20:38:12.772+09:00 ERROR 10500 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletComponentRegisteringPostProcessor': Instantiation of supplied bean failed

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1236) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) ~[spring-beans-6.0.6.jar:6.0.6]

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:199) ~[spring-context-6.0.6.jar:6.0.6]

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:747) ~[spring-context-6.0.6.jar:6.0.6]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:565) ~[spring-context-6.0.6.jar:6.0.6]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1304) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1293) ~[spring-boot-3.0.4.jar:3.0.4]

at heewon.servlet.ServletApplication.main(ServletApplication.java:12) ~[classes/:na]

Caused by: java.lang.NoClassDefFoundError: jakarta/servlet/annotation/WebServlet

at org.springframework.boot.web.servlet.WebServletHandler.<init>(WebServletHandler.java:39) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.boot.web.servlet.ServletComponentRegisteringPostProcessor.<clinit>(ServletComponentRegisteringPostProcessor.java:49) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.boot.web.servlet.ServletComponentScanRegistrar$ServletComponentRegisteringPostProcessorBeanDefinition.lambda$getInstanceSupplier$0(ServletComponentScanRegistrar.java:94) ~[spring-boot-3.0.4.jar:3.0.4]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1230) ~[spring-beans-6.0.6.jar:6.0.6]

... 17 common frames omitted

Caused by: java.lang.ClassNotFoundException: jakarta.servlet.annotation.WebServlet

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]

... 21 common frames omitted

Process finished with exit code 1

 

답변 2

1

안녕하세요.gmldnjs0402 님, 공식 서포터즈 OMG입니다.
.

자주하는 질문을 확인해보시겠어요?
.
감사합니다.

 

0

김영한님의 프로필 이미지
김영한
지식공유자

안녕하세요. gmldnjs0402님

전체 프로젝트를 압축해서 구글 드라이브로 공유해서 링크를 남겨주세요.

구글 드라이브 업로드 방법은 다음을 참고해주세요.

https://bit.ly/3fX6ygx

주의: 업로드시 링크에 있는 권한 문제 꼭 확인해주세요

추가로 다음 내용도 코멘트 부탁드립니다.

1. 실행 방법을 알려주세요.

2. 어떻게 문제를 확인할 수 있는지 자세한 설명을 남겨주세요.

감사합니다.

gmldnjs0402님의 프로필 이미지
gmldnjs0402

작성한 질문수

질문하기