Description: 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$24(TomcatWebServerFactoryCustomizer.java:209) The following method did not exist: org.apache.coyote.http11.AbstractHttp11Protocol.setRejectIllegalHeader(Z)V
时间: 2024-04-28 12:27:27 浏览: 486
这个错误的意思是尝试调用一个不存在的方法。看起来是在Spring Boot应用程序中使用了一个TomcatWebServerFactoryCustomizer中的方法,但是该方法依赖于一个不存在的方法org.apache.coyote.http11.AbstractHttp11Protocol.setRejectIllegalHeader(Z)V。这可能是由于版本不匹配或依赖关系问题引起的。您可以尝试更新相关依赖项,以确保它们与您的Spring Boot版本兼容。
相关问题
*************************** 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.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:255) The following method did not exist: 'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.oracleSqlplus(boolean)' The calling method's class, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration, was loaded from the following location: jar:file:/D:/repository/org/springframework/boot/spring-boot-autoconfigure/3.1.0/spring-boot-autoconfigure-3.1.0.jar!/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class The called method's class, org.flywaydb.core.api.configuration.FluentConfiguration, is available from the following locations: jar:file:/D:/repository/org/flywaydb/flyway-core/9.20.1/flyway-core-9.20.1.jar!/org/flywaydb/core/api/configuration/FluentConfiguration.class The called method's class hierarchy was loaded from the following locations: org.flywaydb.core.api.configuration.FluentConfiguration: file:/D:/repository/org/flywaydb/flyway-core/9.20.1/flyway-core-9.20.1.jar Action: Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration and org.flywaydb.core.api.configuration.FluentConfiguration Disconnected from the target VM, address: '127.0.0.1:52541', transport: 'socket' Process finished with exit code 1 怎么回事
根据错误信息显示,您的应用程序启动失败,原因是在Flyway配置中存在不兼容的类版本。
具体地,错误信息显示在 `org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration` 类中的 `configureProperties` 方法尝试调用了一个不存在的方法 `org.flywaydb.core.api.configuration.FluentConfiguration.oracleSqlplus(boolean)`。
根据错误信息提供的类加载路径,调用方法的类 `org.flywaydb.core.api.configuration.FluentConfiguration` 的版本为 `9.20.1`,而应用程序加载的 `FlywayAutoConfiguration$FlywayConfiguration` 类来自于 `spring-boot-autoconfigure-3.1.0.jar`。
这意味着您的应用程序使用的Spring Boot版本为3.1.0,但使用的Flyway版本为9.20.1,两者不兼容。
解决此问题的方法是确保您的应用程序使用与Spring Boot 3.1.0兼容的Flyway版本。您可以尝试在您的项目配置中指定适当的Flyway版本,或者根据您的需求升级或降级Spring Boot和Flyway版本以实现兼容性。
请注意,具体的解决方法可能会因您的项目结构和依赖关系而有所不同。如果需要进一步帮助,请提供更多关于您的项目配置和依赖的信息。
解决 Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: io.seata.spring.boot.autoconfigure.SeataAutoConfiguration.seataAutoDataSourceProxyCreator(SeataAutoConfiguration.java:74) The following method did not exist: io.seata.spring.annotation.datasource.SeataAutoDataSourceProxyCreator.<init>(Z[Ljava/lang/String;)V The method's class, io.seata.spring.annotation.datasource.SeataAutoDataSourceProxyCreator, is available from the following locations:用中文解决
这个错误提示是说尝试调用一个不存在的方法,具体是在 io.seata.spring.boot.autoconfigure.SeataAutoConfiguration 的第74行,该方法是 seataAutoDataSourceProxyCreator。而且提示说 io.seata.spring.annotation.datasource.SeataAutoDataSourceProxyCreator 这个类的构造方法也不存在,但是它可以从某些位置得到。解决这个问题需要检查代码中是否存在拼写错误或者版本不匹配的问题,可以尝试更新相关库的版本或者查看文档以获得正确的方法调用方式。
阅读全文