2 Replies Latest reply on Jan 8, 2013 6:23 AM by Rahul Razdan

    seam-faces + seam-security + jboss-as:7.1.0.Final + maven

    Rahul Razdan Newbie

      hi ,

       

      I'm working on a project where I'm migrating from seam2 to seam 3 . now during the migration I'm using seam-faces and seam-security . i was able to create a demo using these features which was a web project.

       

      now while integrating in EAR project i found the seam-faces and  security together in EAR gives


      WELD-001409 Ambiguous dependencies for type [FacesContext]

       

      like this 7 exceptions are coming in total :-

       

       

      12:05:58,124 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."blaseam.ear".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."blahseam.ear".WeldService: org.jboss.weld.exceptions.DeploymentException: Exception List with 7 exceptions:

      Exception 0 :

      org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [FacesContext] with qualifiers [@Default] at injection point [[parameter 1] of [method] @Produces @Named @Faces public org.jboss.seam.faces.environment.LocaleProducer.getSupportedLocales(FacesContext)]. Possible dependencies [[Producer Method [FacesContext] with qualifiers [@Any @Default] declared as [[method] @Produces @RequestScoped public com.test.seam.util.WebResources.produceFacesContext()], Producer Method [FacesContext] with qualifiers [@Any @Default] declared as [[method] @Produces @RequestScoped public org.jboss.seam.faces.environment.FacesContextProducer.getFacesContext()]]]

          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:278)

          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)

          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)

          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)

          at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)

          at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)

          at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)

          at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)

          at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

      Exception 0 :

       

       

      i have googled a lot but this found to be a issue in weld .

       

      please help i'm trying this for days.

       

      Thanks