我正在尝试在wildFly 10中部署一个包含sar模块的.ear。
我收到以下错误摘要:
2016-11-29 11:20:12,376 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "forecast-service-11.0.1-SNAPSHOT.ear")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.mbean.service.jboss:service=Naming.create",
"jboss.mbean.service.jboss:service=Naming.start"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.mbean.service.\"com.retx.forecastInject:service=InjectServiceMbean\".start is missing [jboss.mbean.service.jboss:service=Naming.start]",
"jboss.mbean.service.\"com.retx.forecastInject:service=InjectServiceMbean\".create is missing [jboss.mbean.service.jboss:service=Naming.create]"
]
}
sar模块包含以下jboss-service.xml:
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="urn:jboss:service:7.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
<mbean code="com.retx.forecast.initService.InjectService"
name="com.retx.forecastInject:service=InjectServiceMbean">
<!-- attribute name="JndiName">inmemory/maps/MapTest</attribute-->
<depends>jboss:service=Naming</depends>
</mbean>
</server>
InjectServiceMBean.java如下所示:
package com.retx.forecast.initService;
public interface InjectServiceMBean {
public void start() throws Exception;
public void stop() throws Exception;
}
InjectService.java如下所示:
package com.retx.forecast.initService;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.apache.log4j.Logger;
//other imports
public class InjectService implements InjectServiceMBean {
private static Logger _log = Logger.getLogger(InjectService.class);
public void start() throws Exception {
//some code
}
public void stop() throws Exception {
//some code
}
}
我进行了搜索并进行了广泛查找,但只发现了与此类似的未解决问题。我非常感谢您的帮助。
最佳答案
我从jboss-service.xml中删除了该元素
现在已经成功部署了。它的方式在JBoss 4.2.3中很好,但是在Wildfly 10中,由于某种原因导致了问题。也许此依赖项在Wildfly 10中免费提供。...