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>

部署的项目删掉即可。

你可能感兴趣的:(wildfly,wildfly)