AS7 confusing deployment error
jmorr003 Sep 6, 2011 10:52 PMI encountered a deployment error while trying to deploy a modifed quickstart bean-service to the switchyard-as7-0.2 runtime. After some trial an error I was able to narrow it down to a missing module dependency in the manifest of the bean-service jar. The error does not help determine that it was a missing module dependency, at least not with my limited JBoss AS7 experience. Here are the details to reproduce it.
I added a slf4j logger to the OrderServiceBean
package org.switchyard.quickstarts.bean.service;
import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.switchyard.component.bean.Reference;
import org.switchyard.component.bean.Service;
@Service(OrderService.class)
public class OrderServiceBean implements OrderService {
private static final Logger logger = LoggerFactory
.getLogger(OrderServiceBean.class);
:
Deployed it and received the following error:
20:44:00,790 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."switchyard-quickstart-bean-service-0.2.0.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."switchyard-quickstart-bean-service-0.2.0.jar".SwitchYardService: org.switchyard.exception.SwitchYardException: Unknown Service name '{urn:switchyard-quickstart:bean-service:0.1.0}OrderService'.
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:90)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
Caused by: org.switchyard.exception.SwitchYardException: Unknown Service name '{urn:switchyard-quickstart:bean-service:0.1.0}OrderService'.
at org.switchyard.component.bean.deploy.BeanComponentActivator.init(BeanComponentActivator.java:73)
at org.switchyard.deploy.internal.Deployment.deployServices(Deployment.java:321)
at org.switchyard.deploy.internal.Deployment.doStart(Deployment.java:119)
at org.switchyard.deploy.internal.AbstractDeployment.start(AbstractDeployment.java:168)
at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:99)
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:83)
... 5 more
Finally figured out that I could fix it by adding the following to the manifest
Dependencies: org.slf4j services export
Attached is the bean-service code with the added slf4j logger to the OrderServiceBean, and the server.log showing this error and subsequent deployment with the slf4j dependency added to the manifest.
-
bean-service.zip 26.0 KB