JBoss Community

Exposing an EJB through multiple views

created by Lars Åslin in EJB3 - View the full discussion

Hi,

 

I'm trying to expose an EJB through both a local business interface and a JAX-RS interface, but are getting the following error:

 

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."finance.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."finance.war".PARSE: Failed to process phase PARSE of deployment "finance.war"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]

          at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]

Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'FileServiceImpl' is already defined in this module

          at org.jboss.as.ee.component.EEModuleDescription.addComponent(EEModuleDescription.java:137)

          at org.jboss.as.ejb3.deployment.processors.EJBComponentDescriptionFactory.addComponent(EJBComponentDescriptionFactory.java:60)

          at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processSessionBeans(SessionBeanComponentDescriptionFactory.java:157)

          at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processAnnotations(SessionBeanComponentDescriptionFactory.java:86)

          at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)

          at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          ... 5 more

 

 

<code>

public interface FileService {

     ...

}

 

public interface FileServiceLocalBusiness extends FileService {

     ...

}

 

@Path("file")

@Consumes({ "application/json" })

@Produces({ "application/json" })

public interface FileServiceWs extends FileService {

     ...

}

</code>

Reply to this message by going to Community

Start a new discussion in EJB3 at Community