wildfly服务器系列--org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory报错问题的解决

一、问题背景

  1. 使用命令启动wildfly服务器时报错如下:
17:14:50,733 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "YZYWeiXin.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"YZYWeiXin.war#cnsoftbei-yzy\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"YZYWeiXin.war#cnsoftbei-yzy\": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
    Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"YZYWeiXin.war#cnsoftbei-yzy\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
17:14:50,737 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "labmanagement.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"labmanagement.war#labUnit\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"labmanagement.war#labUnit\": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
    Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"labmanagement.war#labUnit\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
17:14:50,740 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "jpa.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"jpa.war#engine_diagnosis_system\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"jpa.war#engine_diagnosis_system\": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
    Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"jpa.war#engine_diagnosis_system\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
17:14:50,745 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "EngineDiagnosisSystem.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"EngineDiagnosisSystem.war#engine_diagnosis_system\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"EngineDiagnosisSystem.war#engine_diagnosis_system\": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
    Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"EngineDiagnosisSystem.war#engine_diagnosis_system\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined

2.$WILDFLY_HOME/standalone/deploments/下standalone.xml文件下:

二、问题分析

个人认为应该是之前部署在wildfly服务器上的项目存在冲突,导致报出dom4j错误。

三、问题解决

将$WILDFLY_HOME/standalone/deploments/standalone.xml中的

<deployments>
</deployments>

部署的项目删掉即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值