0

I'm trying to deploy an .ear containing a sar module in wildFly 10.

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:

<?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:

package com.retx.forecast.initService;

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

InjectService.java looks as follows:

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.

inor
  • 2,781
  • 2
  • 32
  • 42

1 Answers1

1

I removed the element from the jboss-service.xml and now it's deployed successfully. The way it was, was fine in JBoss 4.2.3, but in Wildfly 10 it was causing the problem, for some reason. Perhaps this dependency comes in for free in Wildfly 10....

inor
  • 2,781
  • 2
  • 32
  • 42