Wildfly 9 - How I Eliminate Jackson

I ran into the problem of serializing Jackson with null values ​​on maps. This seems to be a known bug in Jackson's version used by Wildfly 9 ( https://issues.jboss.org/browse/WFLY-4906 ). I would like to use the current version of Jackson; however, I am having trouble excluding the version used by Wildfly. I tried to exclude the module in jboss-deployment-structure.xml, but the exception does not work.

jboss-deployment-structure.xml

Any idea how I can make this work?

+4
source share
2 answers

I just ran into this question.

After updating the library in my application, I received the following error in the request:

Exception handling request to /path: java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.hasToken(Lcom/fasterxml/jackson/core/JsonToken;)

Here's how I solved it:

jackson-core-2.5.1, wildfly-9.

, "jackson-core" /opt/wildfly/modules# grep -R 'jackson-core'

jboss-deployment-structure.xml WEB-INF:

<jboss-deployment-structure>
    <deployment>
        <exclusions>
            <module name="com.fasterxml.jackson.core.jackson-core" />
            <module name="com.fasterxml.jackson.core.jackson-databind" />
            <module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" />
            <module name="org.jboss.resteasy.resteasy-jackson2-provider" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>
+10

. jax-rs subsytem

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
    <exclude-subsystems>
        <subsystem name="jaxrs" />
    </exclude-subsystems>
    ...
</deployment>

Jackson.

+3

All Articles