I ran into the exact same problem with Jackson, and I got it to work in my EAP 7 using this jboss-deployment-structure.xml
:
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="com.fasterxml.jackson.core.jackson-core" />
<module name="com.fasterxml.jackson.core.jackson-annotations" />
<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" />
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
</exclusions>
</deployment>
</jboss-deployment-structure>
It appears like as long as any other modules list jackson as their dependency in their respective module.xml
, it just simply doesn't get excluded, and EAP can't be arsed to even throw a warning about it.
Edit 2018-02-19: When upgrading from EAP 7.0.0 to 7.1.0, things broke again, owing to updated Jackson jars.
This is the crucial part of the stacktrace:
Caused by: javax.ejb.EJBException: WFLYEJB0442: Unexpected Error
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:185)
[...]
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [wildfly-ee-7.1.0.GA-redhat-11.jar:7.1.0.GA-redhat-11]
... 11 more
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
[...]()Lcom/fasterxml/jackson/databind/ObjectMapper; @89: invokevirtual
Reason:
Type 'com/fasterxml/jackson/datatype/jdk8/Jdk8Module' (current frame, stack[1]) is not assignable to 'com/fasterxml/jackson/databind/Module'
So we exclude those as well:
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="com.fasterxml.jackson.core.jackson-core" />
<module name="com.fasterxml.jackson.core.jackson-annotations" />
<module name="com.fasterxml.jackson.core.jackson-databind" />
<module name="com.fasterxml.jackson.datatype.jackson-datatype-jdk8" />
<module name="com.fasterxml.jackson.datatype.jackson-datatype-jsr310" />
<module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" />
<module name="org.jboss.resteasy.resteasy-jackson2-provider" />
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
</exclusions>
</deployment>
</jboss-deployment-structure>