cancel
Showing results for 
Search instead for 
Did you mean: 

EAR with activiti-cdi jar in Lib could NOT be deployed on JBoss WildFly

sankarts
Champ in-the-making
Champ in-the-making
I am trying to deploy an EAR on JBoss Wildfly 8.1.0 Final App Server.
In which I have written a CDI maanged bean using activiti-cdi. The bean shall look like

@Named
@BusinessProcessScoped
public class MyBean implements JavaDelegate, Serializable {

   private static final long serialVersionUID = 1L;
   private static final Logger logger = Logger.getLogger("MyBean.class");
   
   public void execute(DelegateExecution execution) throws Exception {

The EAR contains all the "Activiti" dependencies in the lib folder including activiti-cdi-5.16.1.jar.
The structire of EAR looks like
lib folder - Includes all activiti dependencies activiti-engine-5.16.1.jar, activiti-cdi-5.16.1.jar etc
META-INF - Has beans.xml, application.xml etc
My Application jar & war files

The exception thrown is
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MyEAR.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MyEAR.ear\".WeldStartService: Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name taskId resolves to beans:
  - Producer Method [String] with qualifiers [@TaskId @Any @Named] declared as [[BackedAnnotatedMethod] @Produces @Named @TaskId public org.activiti.cdi.CurrentProcessInstance.getTaskId()],
  - Producer Method [String] with qualifiers [@TaskId @Any @Named] declared as [[BackedAnnotatedMethod] @Produces @Named @TaskId public org.activiti.cdi.CurrentProcessInstance.getTaskId()]"}}

Any idea what is causing this issue?

Thanks,
Shankar
2 REPLIES 2

mandas
Champ in-the-making
Champ in-the-making
Hi,

It seems like a classloading issue. If you take a closer look, WELD exception says that you have two producers for something, but it reports twice the same producer. What is the exact location of that lib folder inside your project? have you set anything like library-directory in your application.xml?

Dimitris

pkonyves
Champ in-the-making
Champ in-the-making
isn't the activiti-cdi jar present in the war file within the ear too?