java - Jboss EAP 7 上的 com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z\explicitly

标签 java spring-boot jersey-2.0 jboss-eap-7

我对 Spring 比较陌生,在将 war 部署到 Jboss EAP 7 时遇到 jackson 数据绑定(bind)错误,但是当我在 Wildfly 10 上部署相同的 war 时,它部署成功。我添加了 Moxy,但它对 Jboss 没有帮助 Jboss日志

"{\"WFLYCTL0080: Failed services\" => {\"jboss.undertow.deployment.default-server.default-host.\\"/gamification-1.0.0\\"\" => \"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.\\"/gamification-1.0.0\\": java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z Caused by: java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z Caused by: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z\"}}"

最佳答案

我知道已经过去很多天了,只是回答其他人遇到的问题。 我所做的只是通过添加以下配置文件从 Jboss 中排除 Rest Easy 实现,因此它不会与 Jersey 配置发生冲突

<jboss-deployment-structure>
        <deployment>
        <exclusions>
            <module name="org.jboss.resteasy.resteasy-jackson2-provider" />
            <module name="org.jboss.resteasy.resteasy-jackson-provider" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>

添加后问题已解决

关于java - Jboss EAP 7 上的 com.fasterxml.jackson.databind.JavaType.isTypeOrSubTypeOf(Ljava/lang/Class;)Z\explicitly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49223201/

相关文章:

java - Android - 使用 NotificationListener 服务接收日历提醒通知

java - 运行hadoop作业: Class not found - org. apache.tools.ant.launch.AntMain

java - Eclipse Spring Tool Suite 在项目创建后使用 GUI 添加依赖项

java - 如何 Swagger 使用 Google Gson 而不是默认的 Jackson of the Spring?

java - 使用 data-rest 包时生成的更改/配置文件端点

java - 使用 RxJava/Jersey2 的异步 RestAPI。线程问题?

java - Android ListView 滚动时丢失背景颜色

java - AngularJs:无法读取从服务器发送的cookie

java - 从 Jersey application.wadl 中排除资源路径?

java - 如何为 DirectoryStream 编写 junit 测试