Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APPLICATION FAILED TO START: 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 #771

Open
brianraila opened this issue Jan 12, 2025 · 2 comments

Comments

@brianraila
Copy link

brianraila commented Jan 12, 2025

What would be causing this?

An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer.lambda$customizeRejectIllegalHeader$20(TomcatWebServerFactoryCustomizer.java:209)
The following method did not exist:
void org.apache.coyote.http11.AbstractHttp11Protocol.setRejectIllegalHeader(boolean)
The calling method's class, org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer, was loaded from the following location:
jar:file:/app/main.war!/WEB-INF/lib/spring-boot-autoconfigure-3.2.6.jar!/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.class
The called method's class, org.apache.coyote.http11.AbstractHttp11Protocol, is available from the following locations:
jar:file:/app/main.war!/WEB-INF/lib/tomcat-embed-core-11.0.2.jar!/org/apache/coyote/http11/AbstractHttp11Protocol.class
The called method's class hierarchy was loaded from the following locations:
org.apache.coyote.http11.AbstractHttp11Protocol: jar:file:/app/main.war!/WEB-INF/lib/tomcat-embed-core-11.0.2.jar!/
org.apache.coyote.AbstractProtocol: jar:file:/app/main.war!/WEB-INF/lib/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

@XcrigX
Copy link
Contributor

XcrigX commented Jan 13, 2025

Errors like that are caused by conflicting versions of a common dependency in the dependency hierarchy.
Are you getting the error using this project as-is, or have you customized it?

@brianraila
Copy link
Author

I am running the project as is.
I resorted to running it via Docker instead and now getting a

Error: Could not find or load main class org.springframework.boot.loader.PropertiesLauncher 2Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.PropertiesLauncher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants