简体   繁体   English

SAR文件导致Wildfly 10中的部署问题

[英]SAR file causing deployment problems in Wildfly 10

I'm trying to deploy an .ear containing a sar module in wildFly 10. 我正在尝试在wildFly 10中部署一个包含sar模块的.ear。

I'm getting the following error summary: 我收到以下错误摘要:

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]"
    ]
}

The sar module contains the following jboss-service.xml: 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 looks as follows: InjectServiceMBean.java如下所示:

package com.retx.forecast.initService;

public interface InjectServiceMBean {
    public void start() throws Exception;
    public void stop() throws Exception;
}

InjectService.java looks as follows: 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
    }

}

I've searched and looked extensively but only found unanswered questions similar to this. 我进行了搜索并进行了广泛查找,但只发现了与此类似的未解决问题。 I would really appreciate the help. 我非常感谢您的帮助。

I removed the element from the jboss-service.xml and now it's deployed successfully. 我从jboss-service.xml中删除了该元素,现在已成功部署它。 The way it was, was fine in JBoss 4.2.3, but in Wildfly 10 it was causing the problem, for some reason. 它的方式在JBoss 4.2.3中很好,但是在Wildfly 10中,由于某种原因导致了问题。 Perhaps this dependency comes in for free in Wildfly 10.... 也许此依赖项在Wildfly 10中免费提供。...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM