jboss wildfly jackson 包冲突

阅读更多
一般java web项目第一次在jboss上发布的时候会遇到elasticsearch的jackson包和jboss的jackson包因为版本冲突,导致发布失败。

我当时的报错信息大概是这样的

Java代码  收藏代码
ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /cmall-admin-web/order/queryForPage.htm: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.common.xcontent.smile.SmileXContent 
遇到这种情况,你可以尝试按照下面的方法修改后再发布:

1、首先在web项目中的WEB-INF目录下新建一个jboss-deployment-structure.xml文件

Java代码  收藏代码
 
 
     
         
         
         
             
             
             
             
             
             
       
 
   
 
 
2、在pom.xml中添加jackson-core的jar包

Java代码  收藏代码
 
 
    com.fasterxml.jackson.core 
    jackson-core 
    2.6.6 
 

你可能感兴趣的:(jboss,wildfly,jackson)