5 Replies Latest reply on Feb 2, 2010 5:28 AM by hal arres

    Problem with jboss-4.2.2.GA and JSF 2

    hal arres Newbie

      Hi all,

       

      I writing my first JSF2 application, which should be run on a jboss-4.2.2.GA.

       

      I solved the first problem to make the application run with sun JSF by using the followin configuration in the web.xml:

          <context-param>
              <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
              <param-value>true</param-value>
          </context-param>

       

      But now I want to inject an EJB into a JSF-Bean by using "@EJB" and I get the following notification:

      JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' does not implement the InjectionProvider interface.

       

      It would be very nice if someone could help me to solve this problem.

       

      All the best,

      arres

        • 1. Re: Problem with jboss-4.2.2.GA and JSF 2
          Stan Silvert Master

          Hi Hal,

           

          This is the preferred way to upgrade to JSF2 for AS4.2.x:

          Upgrade JBoss AS to JSF2

           

          But what you are doing is not fully supported until AS5.x, which is fully JEE5 compliant.  In 5.x it works with JSF 1.2 or JSF 2.0:

          https://jira.jboss.org/jira/browse/JBPAPP-192

           

          There is a workaround for 4.2 that some have success with:

          http://community.jboss.org/thread/109316?tstart=0

           

          Hope that helps,

           

          Stan

          • 2. Re: Problem with jboss-4.2.2.GA and JSF 2
            hal arres Newbie

            Thank you very much for your fast answer

             

            I will try it right now!

             

            Greetings,

            hal

            • 3. Re: Problem with jboss-4.2.2.GA and JSF 2
              hal arres Newbie

              Hi Stan,

               

              I switched to jboss-5.1.0.GA but I get still the same notification:

              JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' does not implement the InjectionProvider interface.

              By the way, I am working in a copy of the "default" server do you think that this might cause the problem?

               

              This are the dependencies from my pom.xml:

                  <dependencies>

                      <!-- Common -->
                      <dependency>
                          <groupId>javax.servlet</groupId>
                          <artifactId>servlet-api</artifactId>
                          <version>2.5</version>
                          <scope>provided</scope>
                      </dependency>
                      <dependency>
                          <groupId>javax.servlet</groupId>
                          <artifactId>jstl</artifactId>
                          <version>1.2</version>
                      </dependency>
                      <dependency>
                          <groupId>log4j</groupId>
                          <artifactId>log4j</artifactId>
                      </dependency>

                      <!-- JSF -->
                      <dependency>
                          <groupId>javax.faces</groupId>
                          <artifactId>jsf-api</artifactId>
                          <version>2.0.0-RC2</version>
                      </dependency>
                      <dependency>
                          <groupId>javax.faces</groupId>
                          <artifactId>jsf-impl</artifactId>
                          <version>2.0.0-RC2</version>
                      </dependency>

                      <!-- EJB -->

                      <dependency>
                          <groupId>javax.ejb</groupId>
                          <artifactId>ejb-api</artifactId>
                          <version>3.0</version>
                          <scope>provided</scope>
                      </dependency>

              ...

                  </dependencies>

               

              Greetings,

              Hal

              • 4. Re: Problem with jboss-4.2.2.GA and JSF 2
                Stan Silvert Master

                Hi Hal,

                 

                For injection to work you'll need the new jboss-faces.jar from AS6 Milestone 1.  I've attached the jar to the Upgrade JBoss AS to JSF2 and updated the instructions.  That should get rid of the warning message, but I haven't tried on AS4.2 yet.  Let me know how it goes.

                 

                BTW, this won't get @EJB injection to work as it does in JEE5.  This will fix things like @PostConstruct and @PreDestroy.  You'll still have to use the workaround if you want to use @EJB with AS4.2.

                 

                Stan

                • 5. Re: Problem with jboss-4.2.2.GA and JSF 2
                  hal arres Newbie

                  Hi Stan,

                   

                  I tried to use it with jboss-4.2.2.GA and 5.1.0.GA but it wouldn't work

                  But in the end I have to run the application on 4.2.2.GA so I deploay the frontend inside a Tomcat. After a few problems it works fine...

                  I am not realy happy with it, but I want only "one EAR" or "one EAR and one WAR" to deploy on the server, without configure the server. So I will go this way.

                   

                  Maybe I will remove the Tomcat with a later version of JBoss

                   

                  Greetings,

                  Hal