wildfly 10: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory

前端 未结 14 949
醉酒成梦
醉酒成梦 2020-11-29 04:25

I have a maven application that works fine in wildfly 8.2, but when Ideployed it in wildfly 10 this error happened:

[2016-02-21 11:22:08,411] Artifact Sarama         


        
相关标签:
14条回答
  • 2020-11-29 05:10

    I had recently the same problem with the dom4j library and Wildfly 10. I found this post (in portuguese) and replaced the dom4j library that comes with Wildfly with the one downloaded from the Maven Central, and that solved the problem.

    The jar is located in $JBOSS_HOME/modules/system/layers/base/org/dom4j/main, you just replace it with the downloaded file, in my case the file was dom4j-1.6.1.jar. I suppose that if you change the version (at the time of this post this is the last version) you should also modify the module.xml file in the same folder, but I've not tried.

    Previously I also tried the self-answer from h.f but didn't solved my problem.

    Hope this contributes to someone with the same problem. Best regards

    0 讨论(0)
  • 2020-11-29 05:14

    Your EAR may contain the duplicate spring jpa configuration file, check and remove the duplicate file

    0 讨论(0)
提交回复
热议问题