egov 프레임워크 4.1 에서 spring boot 프로젝트 실행 방법
- 작성자 :
- 윤*기
- 작성일 :
- 2023-05-26 18:49:17
- 조회수 :
- 67
- 구분 :
- 개발환경 / 4.1
- 진행상태 :
- 완료
Q
### 질문 사항
- 이 프로젝트를 앞으로 쓸 것 같은데 어떻게 실행시키고 React 가 붙지 않아도 서버에서 Hello, Egov! 를 실행시키려면 어떻게 환경 정보를 구성해야 할까요?
### 작업 현황
1. 기존 스프링 이니셜라이즈는 최초 프로젝트 구성 시 내장 톰캣을 지원한다고 생각하여 egov 톰캣 설정없이 프로젝트를 실행 시킴
2. 아래의 에러를 반환함
### 에러 내역
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.configureContext(TomcatServletWebServerFactory.java:379)
The following method did not exist:
'void org.apache.catalina.Context.addServletContainerInitializer(javax.servlet.ServletContainerInitializer, java.util.Set)'
The calling method's class, org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory, was loaded from the following location:
jar:file:/Users/mondrianai/.m2/repository/org/springframework/boot/spring-boot/2.7.0/spring-boot-2.7.0.jar!/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.class
The called method's class, org.apache.catalina.Context, is available from the following locations:
jar:file:/Users/mondrianai/Desktop/apache-tomcat-10.1.9/apache-tomcat-10.0.23/lib/catalina.jar!/org/apache/catalina/Context.class
jar:file:/Users/mondrianai/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.63/tomcat-embed-core-9.0.63.jar!/org/apache/catalina/Context.class
The called method's class hierarchy was loaded from the following locations:
org.apache.catalina.Context: file:/Users/mondrianai/Desktop/apache-tomcat-10.1.9/apache-tomcat-10.0.23/lib/catalina.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory and org.apache.catalina.Context
### 질문 사항
- 이 프로젝트를 앞으로 쓸 것 같은데 어떻게 실행시키고 React 가 붙지 않아도 서버에서 Hello, Egov! 를 실행시키려면 어떻게 환경 정보를 구성해야 할까요?
### 작업 현황
1. 기존 스프링 이니셜라이즈는 최초 프로젝트 구성 시 내장 톰캣을 지원한다고 생각하여 egov 톰캣 설정없이 프로젝트를 실행 시킴
2. 아래의 에러를 반환함
### 에러 내역
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.configureContext(TomcatServletWebServerFactory.java:379)
The following method did not exist:
'void org.apache.catalina.Context.addServletContainerInitializer(javax.servlet.ServletContainerInitializer, java.util.Set)'
The calling method's class, org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory, was loaded from the following location:
jar:file:/Users/mondrianai/.m2/repository/org/springframework/boot/spring-boot/2.7.0/spring-boot-2.7.0.jar!/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.class
The called method's class, org.apache.catalina.Context, is available from the following locations:
jar:file:/Users/mondrianai/Desktop/apache-tomcat-10.1.9/apache-tomcat-10.0.23/lib/catalina.jar!/org/apache/catalina/Context.class
jar:file:/Users/mondrianai/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.63/tomcat-embed-core-9.0.63.jar!/org/apache/catalina/Context.class
The called method's class hierarchy was loaded from the following locations:
org.apache.catalina.Context: file:/Users/mondrianai/Desktop/apache-tomcat-10.1.9/apache-tomcat-10.0.23/lib/catalina.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory and org.apache.catalina.Context
환경정보
-
- OS 정보 : 2.6 GHz 6코어 Intel Core i7
- 표준프레임워크 버전 : 4.1
- JDK(JRE) 정보 : openjdk11
- WAS 정보 : tomcat 9.0.63
- DB 정보 : 최초 프로젝트 구성 후 변경한 내역 없음
- 기타 환경 정보 :
A
안녕하세요.
표준프레임워크센터입니다.
표준프레임워크센터에서 제공한 내용이 아닌 커스터마이징한 프로젝트에 대해서는
상황을 자세히 알 수 없어 답변드리는데 어려움이 있습니다.
올려주신 에러내용을 보면 위에 적혀있는 위치에 있는 메소드들을 호출하였으나 없다고 되어있습니다.
그리고 이에 대한 대응방법으로
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory and org.apache.catalina.Context
라고 되어있습니다.
spring boot가 내장 톰캣을 사용하지만 프로젝트의 클래스패스에 호환되지 않는 것으로 보입니다.
이 부분을 확인해보시길 바랍니다.
감사합니다.
표준프레임워크센터입니다.
표준프레임워크센터에서 제공한 내용이 아닌 커스터마이징한 프로젝트에 대해서는
상황을 자세히 알 수 없어 답변드리는데 어려움이 있습니다.
올려주신 에러내용을 보면 위에 적혀있는 위치에 있는 메소드들을 호출하였으나 없다고 되어있습니다.
그리고 이에 대한 대응방법으로
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory and org.apache.catalina.Context
라고 되어있습니다.
spring boot가 내장 톰캣을 사용하지만 프로젝트의 클래스패스에 호환되지 않는 것으로 보입니다.
이 부분을 확인해보시길 바랍니다.
감사합니다.