에러 로그를 살펴볼때
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1355)
The following method did not exist:
javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
The method's class, javax.servlet.ServletContext, is available from the following locations:
jar:file:/C:/Users/User/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar!/javax/servlet/ServletContext.class
jar:file:/C:/Users/User/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.41/tomcat-embed-core-9.0.41.jar!/javax/servlet/ServletContext.class
The class hierarchy was loaded from the following locations:
javax.servlet.ServletContext: file:/C:/Users/User/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of javax.servlet.ServletContext
위와 같은 에러가 나왔다면 해당 에러는 servlet-api 2.4 버전이 너무 낮다는 뜻이다.
javax.servlet.ServletContext.getVirtualServerName() 메소드는 3.1 버전에서 추가되었으므로 나는 에러이다.
maven 설정을 사용한다면
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
위와 같이 추가 해서 해당 라이브러리에 대한 의존성을 제거해주도록 하자.
'PROJECT > TROUBLE SHOOTING' 카테고리의 다른 글
spring boot 기본 manifest 속성이 없습니다 (0) | 2021.01.22 |
---|---|
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? (0) | 2021.01.20 |
노트북 무선 네트워크 핫스팟 만들기 - 사이트 접속 불가 (0) | 2019.12.06 |
ResourceHttpRequestHandler Path with "WEB-INF" or "META-INF" (0) | 2019.11.06 |
Boot Spring JDBC 연동 에러 (0) | 2019.11.05 |