3 Replies Latest reply on Sep 14, 2007 12:45 PM by enewett

    RF 3.1 + myfaces 1.1.4 view rendering issues

    enewett Newbie

      I've been using RF 3.0.1 in a project for a few weeks without problems. After upgrading to RF 3.1.0 by simply replacing the jars, no components are being rendered in the view (the output HTML simply excludes any non-HTML tags).

      I'm using myfaces 1.1.4 on jboss 4.0.4.ga.

      To eliminate possible causes, I've replaced my web.xml with the one in the developer guide's "Getting Started" section, tried to hit the echo.jsp example, and got the exact same results - nothing present in in the output HTML within the body tag. The only log entries from the page request are at DEBUG level:

      10:46:20,464 DEBUG [BaseFilter] Filter start request processing at 9/14/07 10:46 AM for uri: /lms/echo.jsf
      10:46:20,464 DEBUG [BaseFilter] Filter request output to XML
      10:46:20,464 DEBUG [BaseXMLFilter] XML filter service start processing request
      10:46:20,511 DEBUG [LifecycleImpl] execute(com.sun.faces.context.FacesContextImpl@1ab9dac)
      10:46:20,511 DEBUG [AjaxPhaseListener] Process before phase RESTORE_VIEW 1
      10:46:20,511 DEBUG [InitPhaseListener] Perform additional framework initialization on first request
      10:46:20,511 DEBUG [AjaxPhaseListener] Process before phase RESTORE_VIEW 1
      10:46:20,511 DEBUG [InitPhaseListener] Perform additional framework initialization on first request
      10:46:20,511 DEBUG [RestoreViewPhase] Entering RestoreViewPhase
      10:46:20,526 DEBUG [ViewHandlerImpl] URL pattern of the FacesServlet executing the current request .jsf
      10:46:20,526 DEBUG [ViewHandlerImpl] contextDefaultSuffix .jsp
      10:46:20,526 DEBUG [ViewHandlerImpl] viewId after appending the context suffix /echo.jsp
      10:46:20,526 DEBUG [AjaxStateManager] Can't restore view state : session expired
      10:46:20,526 DEBUG [AjaxViewHandler] Detect session expiration in AJAX request - view don't restored for a viewId /echo.jsf
      10:46:20,526 DEBUG [AjaxViewHandler] Detect session expiration in AJAX request - view don't restored for a viewId /echo.jsf
      10:46:20,526 DEBUG [RestoreViewPhase] New request: creating a view for /echo.jsf
      10:46:20,542 DEBUG [ViewHandlerImpl] Created new view for /echo.jsf
      10:46:20,542 DEBUG [ViewHandlerImpl] Locale for this view as determined by calculateLocale en_US
      10:46:20,542 DEBUG [ViewHandlerImpl] RenderKitId for this view as determined by calculateRenderKitId HTML_BASIC
      10:46:20,558 DEBUG [RestoreViewPhase] Exiting RestoreViewPhase
      10:46:20,558 DEBUG [InitPhaseListener] Remove init phase listener from factories
      10:46:20,558 DEBUG [LifecycleImpl] removePhaseListener(ANY 0,org.ajax4jsf.event.InitPhaseListener@2a730e
      10:46:20,558 DEBUG [AjaxPhaseListener] Process after phase RESTORE_VIEW 1
      10:46:20,573 DEBUG [InitPhaseListener] Remove init phase listener from factories
      10:46:20,573 DEBUG [LifecycleImpl] removePhaseListener(ANY 0,org.ajax4jsf.event.InitPhaseListener@1c83354
      10:46:20,573 DEBUG [AjaxPhaseListener] Process after phase RESTORE_VIEW 1
      10:46:20,573 DEBUG [LifecycleImpl] Skipping rest of execute() because of a reload
      10:46:20,573 DEBUG [LifecycleImpl] render(com.sun.faces.context.FacesContextImpl@1ab9dac)
      10:46:20,573 DEBUG [AjaxPhaseListener] Process before phase RENDER_RESPONSE 6
      10:46:20,573 DEBUG [AjaxPhaseListener] PhaseListener enter Before RenderView Phase with ViewId /echo.jsf and RenderKitId HTML_BASIC
      10:46:20,573 DEBUG [SkinFactory] Class name for SkinFactory set to org.richfaces.skin.SkinFactoryImpl by META-INF/services
      10:46:20,573 DEBUG [SkinFactoryImpl] Create new Skin instance for name DEFAULT
      10:46:20,589 DEBUG [AjaxPhaseListener] Process before phase RENDER_RESPONSE 6
      10:46:20,589 DEBUG [AjaxPhaseListener] PhaseListener enter Before RenderView Phase with ViewId /echo.jsf and RenderKitId HTML_BASIC
      10:46:20,589 DEBUG [RenderResponsePhase] Entering RenderResponsePhase
      10:46:20,589 DEBUG [RenderResponsePhase] About to render view /echo.jsf
      10:46:20,589 DEBUG [ViewHandlerImpl] About to render view /echo.jsf
      10:46:20,589 DEBUG [ViewHandlerImpl] URL pattern of the FacesServlet executing the current request .jsf
      10:46:20,589 DEBUG [ViewHandlerImpl] Found URL pattern mapping to FacesServlet .jsf
      10:46:20,589 DEBUG [ViewHandlerImpl] viewId after appending the context suffix /echo.jsp
      10:46:20,683 DEBUG [TagLibCache] Scanning for tlds in: file:/C:/Dev/jboss-4.0.4.ga/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs/myfaces-impl.jar
      10:46:24,401 DEBUG [UIAjaxSupport] Set ValueBinding for onkeyup event property
      10:46:24,401 DEBUG [UIAjaxSupport] Create JavaScript event string for component _id3
      10:46:24,401 DEBUG [UIAjaxSupport] Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlInputText
      10:46:24,401 DEBUG [UIAjaxSupport] Detect newly created component
      10:46:24,401 DEBUG [UIAjaxSupport] Set ValueBinding for onkeyup event property
      10:46:24,401 DEBUG [UIAjaxSupport] Create JavaScript event string for component _id3
      10:46:24,401 DEBUG [AjaxRegionBrige] Save State of UIAjaxComponent with Id _viewRoot
      10:46:24,432 DEBUG [AjaxRendererUtils] Calculate absolute ID for component _id3 as :_id0:_id3
      10:46:24,432 DEBUG [FilterServletResponseWrapper] Create StringWriter for buffer servlet output
      10:46:24,432 DEBUG [AjaxContext] Process component tree for collect used scripts and styles
      10:46:24,432 DEBUG [InternetResourceBuilder] Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@55108e
      10:46:24,432 DEBUG [HtmlCompiler] Start compile template from css/panel.xcss
      10:46:24,432 DEBUG [HtmlCompiler] Finish compilation template from css/panel.xcss
      10:46:24,432 DEBUG [ResourceBuilderImpl] Build URI for Resource with key [css/panel.xcss] as : /lms/a4j_3_1_0css/panel.xcss/DATB/eAGLZKr5DAADWQHL.jsf
      10:46:24,432 DEBUG [InternetResourceBuilder] Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@55108e
      10:46:24,432 DEBUG [InternetResourceBuilder] Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@55108e
      10:46:24,432 DEBUG [ResourceBuilderImpl] Build URI for Resource with key [org.ajax4jsf.javascript.AjaxScript] as : /lms/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.jsf
      10:46:24,432 DEBUG [AjaxContext] Scripts for insert into head :
      /lms/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.jsf
      
      10:46:24,432 DEBUG [AjaxContext] Styles for insert into head :
      /lms/a4j_3_1_0css/panel.xcss/DATB/eAGLZKr5DAADWQHL.jsf
      
      10:46:24,432 DEBUG [RenderResponsePhase] Exiting RenderResponsePhase
      10:46:24,432 DEBUG [AjaxPhaseListener] Process after phase RENDER_RESPONSE 6
      10:46:24,432 DEBUG [AjaxPhaseListener] Process after phase RENDER_RESPONSE 6
      10:46:24,432 DEBUG [BaseXMLFilter] create HTML/XML parser for content type: text/html
      10:46:24,448 DEBUG [FastHtmlParser] Parser reached state is StateManager.DOCUMENT
      
      ...
      
      10:46:24,464 DEBUG [FastHtmlParser] Parser reached state is StateManager.ENDELEMENT
      10:46:24,464 DEBUG [FastHtmlParser] Found <html> element
      10:46:24,464 DEBUG [FastHtmlParser] Parser reached state is StateManager.DOCUMENT
      
      ...
      
      10:46:24,464 DEBUG [FastHtmlParser] Found <head> element
      10:46:24,464 DEBUG [BaseXMLFilter] Parsing html total time 32ms
      10:46:24,464 DEBUG [BaseFilter] Finished request processing total time 4000ms for uri: /lms/echo.jsf
      10:46:24,495 DEBUG [BaseFilter] Filter start request processing at 9/14/07 10:46 AM for uri: /lms/a4j_3_1_0css/panel.xcss/DATB/eAGLZKr5DAADWQHL.jsf
      10:46:24,495 DEBUG [InternetResourceBuilder] Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@55108e
      10:46:24,495 DEBUG [ResourceBuilderImpl] Restore data object for Resource with key [css/panel.xcss/DATB/eAGLZKr5DAADWQHL] from uri string : null
      10:46:24,495 DEBUG [AjaxPhaseListener] Process before phase RESTORE_VIEW 1
      10:46:24,495 DEBUG [AjaxPhaseListener] Process before phase RESTORE_VIEW 1
      10:46:24,495 DEBUG [AjaxPhaseListener] Process after phase RESTORE_VIEW 1
      10:46:24,495 DEBUG [AjaxPhaseListener] Process before phase RENDER_RESPONSE 6
      10:46:24,495 DEBUG [AjaxPhaseListener] PhaseListener enter Before RenderView Phase with ViewId css/panel.xcss and RenderKitId HTML_BASIC
      10:46:24,495 DEBUG [AjaxPhaseListener] Process before phase RENDER_RESPONSE 6
      10:46:24,495 DEBUG [AjaxPhaseListener] PhaseListener enter Before RenderView Phase with ViewId css/panel.xcss and RenderKitId HTML_BASIC
      10:46:24,495 DEBUG [InternetResourceBase] Set response http headers for Resource with key [css/panel.xcss]
      10:46:24,495 DEBUG [InternetResourceBase] Send content data for Resource with key [css/panel.xcss]
      10:46:24,495 DEBUG [RootElement] Encode compiled template "css/panel.xcss"
      10:46:24,511 DEBUG [InternetResourceBuilder] Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@55108e
      10:46:24,511 DEBUG [InternetResourceBuilder] Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@55108e
      10:46:24,511 DEBUG [ResourceBuilderImpl] Build URI for Resource with key [org.richfaces.renderkit.html.GradientA] as : /lms/a4j_3_1_0org.richfaces.renderkit.html.GradientA/DATB/eAF79urt8fNXABJ3BSg_.jsf
      10:46:24,511 DEBUG [AjaxPhaseListener] Process after phase RENDER_RESPONSE 6
      10:46:24,511 DEBUG [InternetResourceService] Get content from cache for resource css/panel.xcss/DATB/eAGLZKr5DAADWQHL
      10:46:24,511 DEBUG [BaseFilter] Finished request processing total time 16ms for uri: /lms/a4j_3_1_0css/panel.xcss/DATB/eAGLZKr5DAADWQHL.jsf
      10:46:24,557 DEBUG [BaseFilter] Filter start request processing at 9/14/07 10:46 AM for uri: /lms/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.jsf
      10:46:24,557 DEBUG [InternetResourceBase] Set response http headers for Resource with key [org.ajax4jsf.javascript.AjaxScript]
      10:46:24,557 DEBUG [InternetResourceBase] Send content data for Resource with key [org.ajax4jsf.javascript.AjaxScript]
      10:46:24,589 DEBUG [ScriptRenderer] Send 43171 bytes to client for JavaScript resource org.ajax4jsf.javascript.AjaxScript
      10:46:24,589 DEBUG [InternetResourceService] Get content from cache for resource org.ajax4jsf.javascript.AjaxScript
      10:46:24,589 DEBUG [BaseFilter] Finished request processing total time 32ms for uri: /lms/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.jsf
      


      This is evertyhing in the project's WEB-INF/lib:


      activation-1.0.2.jar
      antlr-2.7.2.jar
      antlr-2.7.5H3.jar
      asm-1.5.3.jar
      asm-util-1.3.4.jar
      aspectwerkz-core-0.8.1.jar
      avalon-framework-4.1.5.jar
      batik-1.5-fop-0.20-5.jar
      c3p0-0.9.1.1.jar
      castor-0.9.7.jar
      cglib-2.1.jar
      commons-beanutils-1.7.0.jar
      commons-codec-1.3.jar
      commons-collections-3.1.jar
      commons-digester-1.8.jar
      commons-el-1.0.jar
      commons-email-1.0.jar
      commons-fileupload-1.0.jar
      commons-httpclient-2.0.2.jar
      commons-io-1.1.jar
      commons-lang-2.1.jar
      commons-logging-1.0.4.jar
      commons-validator-1.2.0.jar
      dbunit-2.2.jar
      dbz_sso-1.0.14707.20070802_1752.jar
      dom4j-1.6.1.jar
      dumbster-1.6.jar
      ehcache-1.1.jar
      fop-0.20.5.jar
      hibernate-3.0.5.jar
      icu4j-2.6.1.jar
      jaxen-1.1.1.jar
      jdom-1.0.jar
      joda-time-1.4.jar
      jsf-api-1.1_02.jar
      jsf-impl-1.1_02.jar
      jtds-1.2.jar
      junit-4.3.jar
      junit-addons-1.4.jar
      mail-1.3.3.jar
      myfaces-api-1.1.4.jar
      myfaces-impl-1.1.4.jar
      mysql-connector-java-5.0.5.jar
      oro-2.0.8.jar
      poi-2.5.1-final-20040804.jar
      regexp-1.3.jar
      richfaces-api-3.1.0.jar
      richfaces-impl-3.1.0.jar
      richfaces-ui-3.1.0.jar
      struts-1.2.9.jar
      xalan-2.4.1.jar
      xercesImpl-2.6.2.jar
      xml-apis-1.0.b2.jar
      xml-resolver-1.1.jar
      xmlParserAPIs-2.6.2.jar
      xmlunit-1.0.jar
      xom-1.0.jar



        • 1. Re: RF 3.1 + myfaces 1.1.4 view rendering issues
          Luke Bishop Newbie

          I don't know if the following is the actual problem, but it is important.

          JBoss 4.0.3 and later adds a jsf-lib directory containing myfaces libs by default. See the JBoss WIKI on this subject.

          Make sure only Sun RI or myfaces JSF are in your classpath (not both).

          Clear all tmp and work caches when you make major lib changes.

          • 2. Re: RF 3.1 + myfaces 1.1.4 view rendering issues
            enewett Newbie

            Thanks, I think I found the problem. I'm actually using maven to pull in richfaces-ui-3.1.0 and it has a transitive dependency on the Sun RI implementation. I didn't notice until now that jsf-impl is in my classpath. From the dependencies report:

            Dependency Tree
            
             * mygroup:myartifact:war
             o org.richfaces.ui:richfaces-ui:jar
             + javax.faces:jsf-api:jar
             + javax.faces:jsf-impl:jar
             + org.richfaces.framework:richfaces-impl:jar
             # org.richfaces.framework:richfaces-api:jar
            

            This seems to be getting included by richfaces/ui/pom.xml. Is there a reason it depends directly on the Sun RI implementation?

            • 3. Re: RF 3.1 + myfaces 1.1.4 view rendering issues
              enewett Newbie

              For maven + myfaces RF 3.1 users, this seems to be the best way currently to include RichFaces 3.1.0 in your pom.xml:

               <dependency>
               <groupId>org.richfaces.ui</groupId>
               <artifactId>richfaces-ui</artifactId>
               <version>3.1.0</version>
               <exclusions>
               <exclusion>
               <groupId>javax.faces</groupId>
               <artifactId>jsf-api</artifactId>
               </exclusion>
               <exclusion>
               <groupId>javax.faces</groupId>
               <artifactId>jsf-impl</artifactId>
               </exclusion>
               </exclusions>
               </dependency>