我是Web服务的新手。我接手了另一个开发人员的一些开发项目。 一切都很好,直到我创建了自己的测试项目,看看一切是如何组合在一起的。当我从测试项目恢复到之前的工作项目时,项目会编译但在部署期间不会启动。我甚至不知道从哪里开始寻找。
我正在使用Eclipse Kepler并部署到WildFly服务器。
日志显示以下错误消息:
10:39:06,146 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "JEM-eap.ear")]) - failure description: {
"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".beanmanager]",
"jboss.deployment.unit.\"JEM-eap.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"JEM-eap.ear\".beanmanager]"
],
"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => [
"jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ejb.jar\".POST_MODULE",
"jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".INSTALL",
"jboss.deployment.unit.\"JEM-eap.ear\".INSTALL",
"jboss.persistenceunit.\"JEM-eap.ear/JEM-ejb.jar#JPA-ejb\".__FIRST_PHASE__"
],
"Services that may be the cause:" => [
"jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".beanmanager",
"jboss.deployment.unit.\"JEM-eap.ear\".beanmanager",
"jboss.jdbc-driver.sqljdbc4_jar"
]
}
}
10:39:06,146 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "JascoEnergy")
]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]",
"jboss.data-source.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]"
]}
10:39:06,146 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "JascoEnergy")
]) - failure description: {
"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]",
"jboss.data-source.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]"
],
"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => [
"jboss.data-source.reference-factory.JascoEnergy",
"jboss.naming.context.java.jdbc.JascoEnergy"
],
"Services that may be the cause:" => [
"jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".beanmanager",
"jboss.deployment.unit.\"JEM-eap.ear\".beanmanager",
"jboss.jdbc-driver.sqljdbc4_jar"
]
}
}
答案 0 :(得分:4)
我解决了与您的问题非常相似的问题。
错误日志实际上会告诉您在哪里查看,它实际上表示您的 jdbc-driver 缺失。 WildFly服务器部署文件夹中缺少文件 sqljdbc4.jar 。您需要将jar文件添加到<your_wildfly_server_folder> --> standalone --> deployments
。添加丢失的jar文件后,部署对我来说没问题。
我已经意识到(至少在我的情况下)我的部署尝试之一WildFly服务器上的垃圾收集器出了问题。这将导致在服务器上取消部署所需的jar文件(在您的情况下为 sqljdbc4.jar )。由于这是您自己的应用程序的依赖项,部署您的应用程序将无法正常工作。
如果您看到 deployments 文件夹中存在jar文件,但仍然无法部署应用程序,则需要先重新部署jar文件。您可以从WildFly管理控制台执行此操作,但我还没有找到确切的结果。您也可以通过转到 deployments 文件夹,找到一个名为您丢失的jar文件的文件但扩展名为.undeployed的文件(在您的情况下为 sqljdbc4.jar.undeployed ),然后删除它。如果一切顺利,那么WildFly将自动重新部署您的jar文件。