CAS 覆盖与 CAS 管理覆盖错误

CAS overlay with CAS Management overlay error

我已经安装了tomcat-9.0.41 我构建了 cas-overlay-template 6.3 并将 cas.war 放在了 webapps 中 启动服务器,一切正常。

然后我构建了 cas-management-overlay 6.3,将 cas-management.war 放在了 webapps 中,但是当我重新启动 tomcat 时,当 tomcat 尝试加载

首先我不明白确切的问题是什么以及我应该如何更正该操作正在谈论的这个“类路径”。

如有任何帮助,我们将不胜感激!

2021-01-22 20:39:04,641 WARN [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory method 'formContentFilter' threw exception; nested exception is java.lang.NoSuchMethodError: 'com.fasterxml.jackson.databind.cfg.MutableCoercionConfig com.fasterxml.jackson.dataformat.xml.XmlMapper.coercionConfigDefaults()'>
2021-01-22 20:39:04,666 ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] - <

***************************
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:

    com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:175)

The following method did not exist:

    'com.fasterxml.jackson.databind.cfg.MutableCoercionConfig com.fasterxml.jackson.dataformat.xml.XmlMapper.coercionConfigDefaults()'

The method's class, com.fasterxml.jackson.dataformat.xml.XmlMapper, is available from the following locations:

    jar:file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-dataformat-xml-2.12.0.jar!/com/fasterxml/jackson/dataformat/xml/XmlMapper.class

The class hierarchy was loaded from the following locations:

    com.fasterxml.jackson.dataformat.xml.XmlMapper: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-dataformat-xml-2.12.0.jar
    com.fasterxml.jackson.databind.ObjectMapper: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-databind-2.11.3.jar
    com.fasterxml.jackson.core.ObjectCodec: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-core-2.11.3.jar
    com.fasterxml.jackson.core.TreeCodec: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-core-2.11.3.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of com.fasterxml.jackson.dataformat.xml.XmlMapper

我下载了最新版本,将所有内容重新安装到具有不同域的两个不同 tomcat 服务器中。毕竟不需要

我按照建议使用

./gradlew clean copyCasConfiguration build

错误仍然存​​在。 所以我从

中的cas安装中取出了jar文件
/opt/cas/apache-tomcat-9.0.41/cas/ROOT/WEB-INF/lib/jackson-* 

并将它们复制到

/opt/casmgmt/apache-tomcat-9.0.41/casmgmt/ROOT/WEB-INF/lib/

并且 casmgmt 服务器服务器应用程序已成功启动。显然,编写覆盖源代码的人要么没有足够的文档来说明应该使用什么库和版本以及何时使用,要么他们对依赖项和所有项的配置有某种错误配置