简体   繁体   English

春季启动:org.codehaus.jackson.map.exc.UnrecognizedPropertyException:WebSphere中无法识别的字段“ XX”

[英]Spring boot : org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field “XX” in WebSphere

I have a spring boot application that execute a reverse Swagger Yaml : 我有一个执行反向Swagger Yaml的spring boot应用程序:

<plugin>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-codegen-maven-plugin</artifactId>
    <version>2.3.1</version>
    <executions>
        <execution>
            <id>generate-swagger-java</id>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <inputSpec>${basedir}/src/main/resources/swagger/cview.yaml</inputSpec>
                <apiPackage>client.api</apiPackage>
                <modelPackage>client.model</modelPackage>
                <output>${project.build.directory}/generated-sources</output>
                <language>java</language>
                <configOptions>
                    <dateLibrary>java8</dateLibrary>
                    <library>jersey2</library>
                </configOptions>
            </configuration>
        </execution>
    </executions>
</plugin>

Running with a main class, it works well 与主类一起运行,效果很好

public static void main(final String[] args) {
 SpringApplication.run(SpringBootApp.class, args);
}

But when I run it with SpringBootServletInitializer on WebSphere libertyCore it stucks and gives me those errors when I try to call a web service : 但是,当我在WebSphere libertyCore上使用SpringBootServletInitializer运行它时,它会卡住,并在尝试调用Web服务时给我这些错误:

org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "id_entite" (Class client.model.GaEj), not marked as ignorable

Problem with reading the data, class client.model.SearchResultGaEj, ContentType: application/json;charset=UTF-8

the problem is that i dont have any dependency with org.codehaus.jackson.* 问题是我与org.codehaus.jackson.*没有任何依赖关系org.codehaus.jackson.*

I only use com.fasterxml.jackson.datatype 我只使用com.fasterxml.jackson.datatype

By default, WebSphere uses Codehaus Jackson ( reference ). 缺省情况下, WebSphere使用Codehaus Jackson参考资料 )。 WebSphere uses two Class-loader modes : Parent first and Parent last . WebSphere使用两种Class-loader模式Parent firstParent last You need to be sure that application uses Jackson from FasterXML not from Codehause . 您需要确保应用程序使用的是FasterXML的 Jackson不是Codehause Jackson Spring Boot does not have any own managed libraries but WebSphere is an Application Server which provides many already attached libraries so you do not need to provide them with your app. Spring Boot没有任何自己的托管库,但是WebSphereApplication Server ,它提供了许多已经连接的库,因此您无需为它们提供应用程序。

See: 看到:

  1. Catch JsonProcessingException from Jackson in Websphere Liberty 在Websphere Liberty中从Jackson捕获JsonProcessingException
  2. Change Default JSON Provider on WebSphere Application Server 在WebSphere Application Server上更改默认JSON提供程序
  3. Override Jackson Object Mapper properties on Websphere 8.5.5 using Apache Wink 使用Apache Wink覆盖Websphere 8.5.5上的Jackson对象映射器属性
  4. How to change Jackson version in JAX-RS app (WebSphere Liberty) 如何在JAX-RS应用程序(WebSphere Liberty)中更改Jackson版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jackson解析错误:org.codehaus.jackson.map.exc.UnrecognizedPropertyException异常:无法识别的字段“ Results” - Jackson parsing error: exception org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field “Results” org.codehaus.jackson.map.exc.UnrecognizedPropertyException:无法识别的字段“id”(类标准),未标记为可忽略 - org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field “id” (Class Criteria), not marked as ignorable Java Jackson org.codehaus.jackson.Z1D78DC8ED51214E518B5114E518B511.FE未识别 - Java Jackson org.codehaus.jackson.map.exc.UnrecognizedPropertyException 如何修复org.codehaus.jackson.map.exc.UnrecognizedPropertyException - How to fix org.codehaus.jackson.map.exc.UnrecognizedPropertyException 如何解决异常org.codehaus.jackson.map.exc.UnrecognizedPropertyException - How to resolve exception org.codehaus.jackson.map.exc.UnrecognizedPropertyException com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:无法识别的字段 - com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:无法识别的字段“ g” - com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “g” 解决com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:无法识别的字段 - resolving com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field Jackson 反序列化错误:com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:无法识别 - Jackson deserialization error: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field 无法使用杰克逊,com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException将xml绑定到pojo:无法识别的字段 - can not bind xml to pojo using jackson, com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM