2 Replies Latest reply on Oct 8, 2015 11:22 AM by Marcial Atiénzar Navarro

    Two beans cannot specialize the same bean Session bean

    Marcial Atiénzar Navarro Newbie

      Hi,

       

      I've a problem with CDI on wildfly 9.0.1 with this structure:

      EAR

      --- WAR 1

      --- WAR 2

       

      WAR 1 has a bean (BEAN 2) that specializes BEAN 1

      WAR 2 has another bean (BEAN 3) that specializes BEAN 1 (the same BEAN 1 that WAR 1)

       

      When I deploy it on wildfly I've this error:    

      Caused by: org.jboss.weld.exceptions.InconsistentSpecializationException: WELD-001401: Two beans cannot specialize the same bean Session bean [class org.kyrian.common.server.reporting.ReportingBean with qualifiers [@Any @Default]; local interfaces are [ReportingBean]
              at org.jboss.weld.bootstrap.Validator.validateSpecialization(Validator.java:494)
              at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:484)
              at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:443)
              at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:90)
              at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:94)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
      

      May be an issue on cdi implementation of wildfly? Or I'm doing something wrong?