4 Replies Latest reply on Mar 7, 2012 9:44 AM by membersound

    FacesContext Injection does not work

    membersound

      Hi,

       

      I'm already using Seam annotations like @Model.

       

      I now want to make use of injecting @Inject FacesContext without making static reference calls.

       

      Unfortunately I always get Exception using this.

       

      01:17:54,750 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."MyAppWEB.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyApp.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [FacesContext] with qualifiers [@Default] at injection point [[field] @Inject private util.Locale.facesContext]
          at org.jboss.as.weld.services.WeldService.start(WeldService.java:96)
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [:1.7.0_01]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.7.0_01]
          at java.lang.Thread.run(Unknown Source) [:1.7.0_01]
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [FacesContext] with qualifiers [@Default] at injection point [[field] @Inject private util.Locale.facesContext]
          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:270)
          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:106)
          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:129)
          at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:351)
          at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:336)
          at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:404)
          at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
          at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
          ... 5 more
      

       

       

      Could I be missing any dependency? Or what else could be wrong?

      ty