Programing/Error Resolution(오류해결)

[오류] Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer and org.apache.coyote.AbstractProtocol 문제 해결

세기루민 2025. 2. 28. 09:19
728x90

오류

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer and org.apache.coyote.AbstractProtocol
  • TomcatWebServerFactoryCustomizer와 coyote.abstractProtocol 간 버전 충돌에 따른 문제 

 

 

 

 

tomcat Version Upgrade 수행

build.gradle 아래 내용 추가하였음

ext['tomcat.version'] = '11.0.2'

 

근데 또 다른 문제가 발생하게 됨 

....
org.apache.coyote.http11.AbstractHttp11Protocol: file:/C:/Users/sgmoomin/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/11.0.2/b9b191afafcb4794b74a7f46266caa5b7817aed8/tomcat-embed-core-11.0.2.jar
    org.apache.coyote.AbstractProtocol: file:/C:/Users/sgmoomin/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/11.0.2/b9b191afafcb4794b74a7f46266caa5b7817aed8/tomcat-embed-core-11.0.2.jar
 
 
Action:
 
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer and org.apache.coyote.http11.AbstractHttp11Protocol

 

내용을 해석해보면...

2개의 라이브러리가 충돌나는 이슈로 확인되었고

해당 이슈를 해결하려고 이것저것 삽질을하다가 알게된 사실이 하나 있다.

Spring Boot는 아직 Tomcat 11을 지원하지 않는다는 점.....

이에 따라 Tomcat 10 버전 중 상위 버전으로 변경하였다.

 

ext['tomcat.version'] = '10.1.28'

위와 같이 변경하였더니 문제는 해결되었다.

 

참고 문헌

https://stackoverflow.com/questions/78051800/spring-boot-3-2-2-with-tomcat-embed-core11-0-0-m17

728x90