Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-13017

richfaces-bom 4.3.2.Final, JSF-API 2.1.0 not compatible

    Details

    • Sprint:
      RichFaces 4.3.4 Sprint 1
    • Steps to Reproduce:
      Hide

      Build tool - Maven
      AS - Tomcat 7
      Java - JDK 7

      Create a simple webapp which includes Richfaces-4.3.2.Final and try to deploy it in tomcat , it fails.

      The way to import Richfaces is using bom-import:

            <dependencyManagement>
                <dependencies>
                    <dependency>
                       <groupId>org.richfaces</groupId>
                       <artifactId>richfaces-bom</artifactId>
                       <version>4.3.2.Final</version>
                       <scope>import</scope>
                       <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
      
            <dependencies>
                  <!-- Richfaces dependencies -->
                  <dependency>
                       <groupId>org.richfaces.ui</groupId>
                       <artifactId>richfaces-components-ui</artifactId>
                  </dependency>
                  <dependency>
                      <groupId>org.richfaces.core</groupId>
                      <artifactId>richfaces-core-impl</artifactId>
                  </dependency>
                  <!-- Richfaces dependencies Ends here -->
           </dependencies>
      
      Show
      Build tool - Maven AS - Tomcat 7 Java - JDK 7 Create a simple webapp which includes Richfaces-4.3.2.Final and try to deploy it in tomcat , it fails. The way to import Richfaces is using bom-import: <dependencyManagement> <dependencies> <dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces-bom</artifactId> <version>4.3.2.Final</version> <scope> import </scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- Richfaces dependencies --> <dependency> <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-components-ui</artifactId> </dependency> <dependency> <groupId>org.richfaces.core</groupId> <artifactId>richfaces-core-impl</artifactId> </dependency> <!-- Richfaces dependencies Ends here --> </dependencies>

      Description

      In the bom of RichFaces, the version of JSF-API being used is

       
            <version.com.sun.faces.jsf-api>2.1.0</version.com.sun.faces.jsf-api>
      

      but the version of JSF-IMPL put in use is:

       
                 <version.org.jboss.javax.faces.jsf-impl>2.1.19-jbossorg-1</version.org.jboss.javax.faces.jsf-impl>
      

      Both the version don't seem to go together. Got the following stack-trace:

      SEVERE: ContainerBase.addChild: start:
      org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/abc]]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
              at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
              at com.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:281)
              at com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:107)
              at com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:115)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5274)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              ... 11 more
       
       
      May 21, 2013 11:30:43 AM org.apache.catalina.startup.HostConfig deployWAR
      SEVERE: Error deploying web application archive F:\DevTools\apache-tomcat-7.0.34\webapps\abc.war
      java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/abc]]
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
              at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      

      I had to manually delete the 2.1.0 jsf-api jar from the war file and copy 2.1.19, with this I was able to bypass this error.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bleathem Brian Leathem
                Reporter:
                him-bhar Himanshu Bhardwaj
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 15 minutes
                  15m
                  Remaining:
                  Remaining Estimate - 15 minutes
                  15m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified