首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CAS覆盖与CAS管理覆盖错误

CAS覆盖与CAS管理覆盖错误
EN

Stack Overflow用户
提问于 2021-01-23 16:14:16
回答 1查看 846关注 0票数 1

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

然后我构建了cas-management-overlay 6.3,将cas-management.war放在了webapps中,但是当我重启tomcat时,当tomcat尝试加载时,我得到了以下错误

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

任何帮助都将不胜感激!

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-24 02:30:35

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

我按照建议使用

代码语言:javascript
复制
./gradlew clean copyCasConfiguration build

错误仍然存在。所以我从cas安装包中获取了jar文件。

代码语言:javascript
复制
/opt/cas/apache-tomcat-9.0.41/cas/ROOT/WEB-INF/lib/jackson-* 

把他们骗到了

代码语言:javascript
复制
/opt/casmgmt/apache-tomcat-9.0.41/casmgmt/ROOT/WEB-INF/lib/

并且casmgmt服务器服务器应用程序已成功启动。显然,编写覆盖图源代码的人要么没有足够的文档来说明应该使用什么库和版本,什么时候应该使用,要么就是对依赖关系等方面存在某种错误的配置

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65857087

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档