我跑進傑克遜的確切同樣的問題,我在我的EAP 7到工作中使用該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>
它看起來像只要任何其他模塊列表傑克遜自己依賴於它們各自的module.xml
,它只是簡單地不被排除,並且EAP不能被放棄甚至對它發出警告。
編輯2018-02-19:從EAP 7.0.0升級到7.1.0時,由於更新的傑克遜瓶子,事情再次爆發。
這是堆棧跟蹤的關鍵部分:
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'
所以我們排除那些還有:
<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>
是部署的耳朵? – ctomc
由於其他傑克遜模塊依賴於該模塊,因此您需要謹慎操作。是否有你需要更新版本的理由? –
我們需要Apache Camel。 – CSchulz