2 Replies Latest reply on Nov 22, 2012 8:48 PM by jbionda

    JBOSS 7.1.1.Final how to upgrade JSF

    javatwo

      Hello,

      There are some bugs that were fixed in newer version of JSF. I need to replace JSF 2.1.7(coming with JBOSS) with JSF 2.1.14.

      In the jboss-deployment-structure.xml,

       

      <exclusions>

            <module name="javax.faces.api" />

            <module name="com.sun.jsf-impl" />    

      </exclusions>

       

      and include JSF2.1.14 in WEB-INF/lib.

       

      web.xml

      -----------

          <context-param>

              <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

              <param-value>true</param-value>

          </context-param>

       

      Got exception:

       

      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!

           Class org.jboss.as.web.deployment.jsf.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider

       

      I saw some discussions about these, but I did not see HOW-TO.

      Thanks for any help.

       

      Dave

        • 1. Re: JBOSS 7.1.1.Final how to upgrade JSF
          ssilvert

          If your only goal is to upgrade the Mojarra version then I suggest following the same procedure as in JBoss 7.1 - Migration to JSF 2.2.

           

          In AS7.2, you will be able to do this: Design of AS7 multi-JSF feature, which lets you run several fully-integrated JSF impls in the same container.

           

          Stan

          • 2. Re: JBOSS 7.1.1.Final how to upgrade JSF
            jbionda

            I'm working on a project that is successfully replacing JBoss 7.1.1's JSF with MyFaces 2.1.9.  We only use the context-param method in the web.xml (exactly as you have it) and do not have those exclusions in the jboss-deployment-structure.xml file.  Note that we do have an exclusion defined for the log4j module in an attempt to use our own but that isn't working -don't know why-, but it appears we don't need it to override JSF.  Also of note is that we don't have anything classloader controls in the jboss-web.xml.  For our web.xml. we use the latest web-app version and namespace defs as follows (again don't know if it matters but it's what works for us):

             

            <?xml version="1.0" encoding="UTF-8"?>

            <web-app version="3.0"

                     xmlns="http://java.sun.com/xml/ns/javaee"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                     xmlns:web="http://java.sun.com/xml/ns/javaee/webapp_3_0.xsd"

                     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_3_0.xsd">

             

                <display-name>Our product name</display-name>

             

                <context-param>

                  <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

                  <param-value>true</param-value>

                </context-param>

                <context-param>

                  <param-name>javax.faces.CONFIG_FILES</param-name>

                   blah, blah, blah...

             

            Of course you need to put your new JSF lib(s) into the web-inf/lib and reconcile all proper dependent lib versions (probably not a problem with a 2.1.7 to 2.1.14 if sticking with the same JSF vendor, but worth checking them out anyway).

             

            Good luck and hope this helps.

             

            Jon