Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-31

WELD-001414 Bean name is ambiguous (but only one class reported)

    Details

      Description

      My Application is failing at startup, returning the code WELD-001414 - "Bean name is ambiguous". But, there's only one class in the entire project to be injected at that point.

      The error message is:
      "Name autenticacaoCertificadoMb resolves to beans [Managed Bean [class br.com.bry.portal.controle.mb.uteis.temp.AutenticacaoComCertificadoMB] with qualifiers [@Any @Default @Named], Managed Bean [class br.com.bry.portal.controle.mb.uteis.temp.AutenticacaoComCertificadoMB] with qualifiers [@Any @Default @Named]]".

      As you can see, it reports the same class twice.
      The complete stacktrace is below:

      13:42:54,182 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."portal-ear.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."portal-ear.ear".WeldStartService: Failed to start service
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name autenticacaoCertificadoMb resolves to beans [Managed Bean [class br.com.bry.portal.controle.mb.uteis.temp.AutenticacaoComCertificadoMB] with qualifiers [@Any @Default @Named], Managed Bean [class br.com.bry.portal.controle.mb.uteis.temp.AutenticacaoComCertificadoMB] with qualifiers [@Any @Default @Named]]
      at org.jboss.weld.bootstrap.Validator.validateBeanNames(Validator.java:476)
      at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:373)
      at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
      at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      ... 3 more

      13:42:54,397 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "portal-ear.ear" was rolled back with the following failure message:
      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"portal-ear.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"portal-ear.ear\".WeldStartService: Failed to start service
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name autenticacaoCertificadoMb resolves to beans [Managed Bean [class br.com.bry.portal.controle.mb.uteis.temp.AutenticacaoComCertificadoMB] with qualifiers [@Any @Default @Named], Managed Bean [class br.com.bry.portal.controle.mb.uteis.temp.AutenticacaoComCertificadoMB] with qualifiers [@Any @Default @Named]]"}}

      Additional info: When deployed to JBoss 7.1.1.Final, the same project works well. I moved to the EAP 6.1.0 because of the PicketLink version embedded (2.5.1, instead of 2.0.2 on AS 7.1.1.Final).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                ramonfacchin Ramon Facchin
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: