gpt4 book ai didi

java - SAR 文件导致 Wildfly 10 中出现部署问题

转载 作者:行者123 更新时间:2023-12-01 09:11:58 25 4
gpt4 key购买 nike

我正在尝试在 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 中是免费的......

关于java - SAR 文件导致 Wildfly 10 中出现部署问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40864590/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com