WildFly SAR deploy error
i.barhoumi Mar 15, 2015 1:15 PMHello everybody,
I'm trying to deploy a .ear contains a sar module in wildFly8.2, in my sar module the jboss-service.xml like below
<?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.frenchconnexion.communication.process.CommunicationProcess" name="FrenchConnexion:service=CommunicationProcess"> <depends>jboss:service=Naming</depends> <depends>jboss.jca:service=ConnectionFactoryBinding,name=JmsXA </depends> <attribute name="Frequency">1000</attribute> <attribute name="Latency">300000</attribute> </mbean> </server>
Here my CommuicatorProcess
package com.frenchconnexion.communication.process; import org.jboss.logging.Logger; public class CommunicationProcess implements CommunicationProcessMBean { private static Logger log = Logger.getLogger(CommunicationProcess.class); private static final long DEFAULT_FREQUENCY = 2 * 1000; private static final long DEFAULT_LATENCY = 10 * 60 * 1000; private CommunicationProcessTask communicationProcessTask = null; private long frequency = DEFAULT_FREQUENCY; private long latency = DEFAULT_LATENCY; public CommunicationProcess() { communicationProcessTask = new CommunicationProcessTask(); } /** * Start CommunicationProcess thread */ public void start() { if (communicationProcessTask != null && communicationProcessTask.isRunning()) { log.info("CommunicationProcess is already running"); } else { log.info("Starting CommunicationProcess"); communicationProcessTask = null; communicationProcessTask = new CommunicationProcessTask(); communicationProcessTask.setFrequency(this.frequency); communicationProcessTask.setLatency(this.latency); communicationProcessTask.startTask(); } } /** * Strop CommunicationProcess thread */ public void stop() { if (communicationProcessTask == null || (communicationProcessTask != null && !communicationProcessTask.isRunning())) { log.info("CommunicationProcess is not running"); } else { try { log.info("Stopping CommunicationProcess"); communicationProcessTask.stopTask(); // wait for CommunicationProcessTask to die communicationProcessTask.join(); communicationProcessTask = null; log.info("CommunicationProcess stopped"); } catch (Exception ex) { log.error("Unable to stop CommunicationProcess : " + ex.getMessage()); ex.printStackTrace(); } } } /* * (non-Javadoc) * @see com.frenchconnexion.communication.process.CommunicationProcessMBean#getState() */ public String getState() { if (communicationProcessTask != null && communicationProcessTask.isRunning()) { return "Running"; } return "Stopped"; } /* * (non-Javadoc) * @see com.frenchconnexion.communication.process.CommunicationProcessMBean#setFrequency(long) */ public void setFrequency(long frequency) { if (this.frequency != frequency) { this.frequency = frequency; if (communicationProcessTask != null && communicationProcessTask.isRunning()) { log.info("Updating frequency to : " + this.frequency + "ms"); communicationProcessTask.setFrequency(this.frequency); } } } /* * (non-Javadoc) * @see com.frenchconnexion.communication.process.CommunicationProcessMBean#getFrequency() */ public long getFrequency() { return this.frequency; } /* * (non-Javadoc) * @see com.frenchconnexion.communication.process.CommunicationProcessMBean#setLatency(long) */ public void setLatency(long latency) { if (this.latency != latency) { this.latency = latency; if (communicationProcessTask != null && communicationProcessTask.isRunning()) { log.info("Updating latency to : " + this.latency + "ms"); communicationProcessTask.setLatency(this.latency); } } } /* * (non-Javadoc) * @see com.frenchconnexion.communication.process.CommunicationProcessMBean#getLatency() */ public long getLatency() { return this.latency; } }
And my CommunicatorProcessMBean.java
package com.frenchconnexion.communication.process; public interface CommunicationProcessMBean { public void start(); public void stop(); /** * Get service state * @return */ public String getState(); /** * Set service frequency * @param frequency */ public void setFrequency(long frequency); /** * Get service frequency * @return */ public long getFrequency(); /** * Set service latency : time to wait before trying to resend a message * when an error occured * @param latency */ public void setLatency(long latency); /** * Get service latency : time to wait before trying to resend a message * when an error occured */ public long getLatency(); }
The server trace error is like this:
18:11:55,968 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: AllianceNicEAR.ear
18:11:56,061 INFO [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900: 2.2.6 (Final)
18:11:56,697 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016008: Starting weld service for deployment AllianceNicEAR.ear
18:12:01,510 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "AllianceNicEAR.ear")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.start is missing [jboss.mbean.service.jboss:service=Naming.start, jboss.mbean.service.\"jboss.jca:service=ConnectionFactoryBinding,name=JmsXA\".start]",
"jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.create is missing [jboss.mbean.service.\"jboss.jca:service=ConnectionFactoryBinding,name=JmsXA\".create, jboss.mbean.service.jboss:service=Naming.create]"
]}
18:12:01,709 INFO [org.jboss.as.server] (ServerService Thread Pool -- 27) JBAS018559: Deployed "AllianceNicEAR.ear" (runtime-name : "AllianceNicEAR.ear")
18:12:01,714 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.mbean.service."jboss.jca:service=ConnectionFactoryBinding,name=JmsXA".create (missing) dependents: [service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.create]
service jboss.mbean.service."jboss.jca:service=ConnectionFactoryBinding,name=JmsXA".start (missing) dependents: [service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.start]
service jboss.mbean.service.jboss:service=Naming.create (missing) dependents: [service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.create]
service jboss.mbean.service.jboss:service=Naming.start (missing) dependents: [service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.start]
18:12:02,637 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016009: Stopping weld service for deployment AllianceNicEAR.ear
18:12:02,770 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015974: Stopped subdeployment (runtime-name: CommunicationService-0.0.1-SNAPSHOT.jar) in 318ms
18:12:02,772 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015974: Stopped subdeployment (runtime-name: FrenchConnexionCommon-0.0.1-SNAPSHOT.jar) in 320ms
18:12:02,772 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: LogService-0.0.1-SNAPSHOT.jar) in 319ms
18:12:03,023 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: CommunicationServiceSAR-0.0.1-SNAPSHOT.sar) in 570ms
18:12:03,063 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment AllianceNicEAR.ear (runtime-name: AllianceNicEAR.ear) in 612ms
18:12:03,065 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
18:12:03,070 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
18:12:03,070 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 32544ms - Started 196 of 246 services (82 services are lazy, passive or on-demand)
18:12:03,489 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "AllianceNicEAR.ear" (runtime-name: "AllianceNicEAR.ear")
18:12:03,490 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.subunit."AllianceNicEAR.ear"."CommunicationServiceSAR-0.0.1-SNAPSHOT.sar".component.FrenchConnexion:service=CommunicationProcess.START (missing) dependents: [service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.create]
service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.create (missing) dependents: [service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.start]
service jboss.mbean.service.FrenchConnexion:service=CommunicationProcess.start (missing) dependents: [service jboss.mbean.registration.FrenchConnexion:service=CommunicationProcess]
Please who have an idea. Thanks