wildfly服务器系列--widlfly启动Operation ("add") failed失败以及org.dom4j.DocumentFactory cannot be cast to org.d

一、问题描述

  启动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.1 报错关键字

  1.(Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([(“deployment” => “YZYWeiXin.war”)]) - failure
 2.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

2.2 可能原因分析

  1.可能原因一:hibernate与dom4j的配置存在问题,比如版本冲突问题。
  这个问题其实已经遇到过多次了,在使用
  mvn clean package wildfly:deploy
  命令部署项目时也会报关于dom4j的错误,而dom4j大多与hibernate,jpa的配置有关,所以,可能原因一:
  hibernate与dom4j的配置存在问题,比如版本冲突问题。
  2.可能原因二:之前的项目存在问题,也是版本冲突问题。

三、问题解决

  这个解决方法过于笼统,但是能解决问题:
  1.删掉$WILDFLY_HOME/standalone/deploments目录下部署的项目;
  de
  2.删掉$WILDFLY_HOME/standalone/configration/standalone.xml文件中出错的项目部署。
  dep

四、相关问题

  服务器启动时端口被占用问题,参见博客:
  http://blog.csdn.net/qq_33429968/article/details/72453652

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值