1 Reply Latest reply on Oct 5, 2009 7:02 PM by blabno

    Cannot Inject FacesMessages

    smilder
      Hi,

      I am new to Seam and have a bit of a puzzling situation. We have an application that is deployed to JBoss 5.0.1.GA as a war file that is POJO-based. It was working fine with Seam 2.0.X under Tomcat, but we felt we needed to move to a better-supported platform, so we migrated it to JBoss and Seam 2.1.2.GA. We noticed attempting to inject FacesMessages failed.

      The following code:

          @In
          private FacesMessages facesMessages;

      Results in the error:

          org.jboss.seam.RequiredException: @In attribute requires non-null value: RequestManager.facesMessages


      A bit of digging around in the code led us to this workaround:

          @In(value="org.jboss.seam.international.statusMessages")
          private FacesMessages facesMessages;

      This works fine, and I can see in the components.xml bundled in the Seam jar that the mapping to "facesMessages" indeed exists and if I try and add it myself in the components.xml of the application, it fails stating that it already exists. All other injected entities work without issue. It is only FacesMessages that has this problem. We are fine with this workaround, but are puzzled why this is happening. Anyone have any ideas?

      Thanks!

      Seth