3 Replies Latest reply on Dec 17, 2009 5:56 AM by braduk

    richfaces configuration with spring web flow

      Hi all,

       

      I'm trying to get richfaces working with spring web flow on JBoss 5.1. After lots of configuration issues I think I'm nearly there but I'm having trouble getting the richfaces tags to render. Basically the tags weren't being expanded, they'd just come back in their original raw form.

       

      I think that problem may have been due to my faces-config.xml which was missing the view handler. So I added that:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
      
           <application>
                <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
           </application>     
      
      </faces-config>
      

      Once I add the view handler section I get this error:

       

      2009-12-16 10:15:14,071 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/test]](main) Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! 
        Source Document: vfszip:/C:/java/jboss-5.1.0.GA/server/default/deploy/test.war/WEB-INF/lib/richfaces-ui-3.3.2.SR1.jar/META-INF/faces-config.xml
        Cause: Class 'org.richfaces.component.ClonedObjectResolver' is not an instance of 'class javax.el.ELResolver'
           at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:213)
           at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
      
      ...
      
      
      Caused by: com.sun.faces.config.ConfigurationException: 
        Source Document: vfszip:/C:/java/jboss-5.1.0.GA/server/default/deploy/test.war/WEB-INF/lib/richfaces-ui-3.3.2.SR1.jar/META-INF/faces-config.xml
        Cause: Class 'org.richfaces.component.ClonedObjectResolver' is not an instance of 'class javax.el.ELResolver'
           at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:259)
           at com.sun.faces.config.processor.ApplicationConfigProcessor.addELResolver(ApplicationConfigProcessor.java:415)
           at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:235)
           at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
           at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
           at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
           at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
           at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:203)
      

       

      Can anyone tell me where I'm going wrong? I'm pretty keen to get this working.

       

      Thanks,

      Brad.

        • 1. Re: richfaces configuration with spring web flow
          nbelaevski

          Hi Brad,

           

          Looks like you have conflicting versions of EL-API in your application and application server.

          • 2. Re: richfaces configuration with spring web flow

            Hi Nick,

             

            thanks for answering.

             

            I tried using the el-api.jar that comes with JBoss 5.1 in C:\java\jboss-5.1.0.GA\common\lib. That gives me the same error:

             

            Cause: Class 'org.richfaces.component.ClonedObjectResolver' is not an instance of 'class javax.el.ELResolver'
            

             

            If I remove el-api.jar from my WEB-INF/lib I get:

             

            org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/sun/el/ExpressionFactoryImpl
            
            

            Looking at the maven config info in the docs at

             

             http://docs.jboss.org/richfaces/3.3.2.GA/en/devguide/html/GettingStarted.html
            

             

            I see it lists

             

            http://repository.jboss.com/maven2/javax/el/el-api/1.0/el-api-1.0.jar
            

             

            ....I tried that one too and got the error about ClonedObjectResolver. Any ideas?

            .

            • 3. Re: richfaces configuration with spring web flow

              Ok that was fixed by removing el-api.jar from WEB-INF/lib and adding in el-ri.jar. I tried my test page and got a NullPointerException:

               

              
              ERROR  [compiler] Missing Built-in Tag Libraries! Make sure they are included within the META-INF di
              rectory of Facelets' Jar
              ERROR  [viewhandler] Error Rendering View[/home.xhtml]
              java.lang.NullPointerException
                   at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                   at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
              
              

               

              I upgraded to the jsf-facelets.jar from jboss-seam-2.2.0.GA as described in this page:

               

              http://seamframework.org/Community/JBoss5AndFacelets
              

               

              ......and it works!

               

              Thanks for your help Nick.