5 Replies Latest reply on Dec 2, 2012 8:38 PM by Luis Eduardo Agudelo González

    RichFaces 4.1 - IE9 re render failure

    John Aja Newbie

      I am running an application using RichFaces 4.1.0, mojarra 2.0.2 and apache tomcat 6.0.32.

      My app runs well in all the different browsers except IE9.

      It stops working in IE 9 and does not generate any javascript error or tomcat logs.

      It fails whenever an a4j re-render operation happens.

      I cannot use due to design constraints the meta tag to set the IE9 in compatiblity mode.

       

       

      Below is my code and web.xml:

       

       

      {code:xml}<h:body>

          <h:form>

              <rich:tabPanel switchType="client">

                  <rich:tab header="Overview">

                      <span>Total Number of Applications</span>

                  </rich:tab>

                  <rich:tab header="Options" onheaderclick="refreshOptions();" >

                      <h:outputText value="Logging Level:" />

                      <rich:select id="optionsLogLevel"

                                   value="#{optionsBean.logLevel}"

                                   required="true"

                                   requiredMessage="Logging Level is required">

                          <f:selectItems value="#{optionsBean.logLevelsList}" />

                      </rich:select>

                  </rich:tab>

              </rich:tabPanel>

              <a4j:jsFunction name="refreshOptions"

                          action="#{optionsBean.refreshOptions}"

                          render="optionsLogLevel" execute="@this" />

          </h:form>

      </h:body>{code}

       

       

       

       

       

       

      web.xml

       

       

      {code:xml}<?xml version="1.0" encoding="UTF-8"?>

      <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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-app_2_5.xsd">

       

          <servlet>

              <servlet-name>Faces Servlet</servlet-name>

              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

          </servlet>

          <servlet-mapping>

              <servlet-name>Faces Servlet</servlet-name>

              <url-pattern>*.jsf</url-pattern>

          </servlet-mapping>

          <context-param>

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

              <param-value>Production</param-value>

          </context-param>

          <context-param>

              <param-name>com.sun.faces.enableEarlyMissingResourceLibraryDetection</param-name>

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

          </context-param>

          <welcome-file-list>

              <welcome-file>index.jsp</welcome-file>

          </welcome-file-list>

          <listener>

              <listener-class>com.mitel.bpi.webadmin.model.BPIWebAdminContextListener</listener-class>

          </listener>

      </web-app>{code}

       

       


        • 1. Re: RichFaces 4.1 - IE9 re render failure
          Lukáš Fryč Master

          Hi John,

           

          it seems that bug was already fixed in Mojarra 2.1.7 [1],

           

          if you are using lower version, you can provide your own patched jsf.js (using the patch in [1]).

           

          You can use resource mapping to point to your patched version [2]

           

          [1] http://java.net/jira/browse/JAVASERVERFACES-2063

          [2] http://docs.jboss.org/richfaces/latest_4_X/Developer_Guide/en-US/html/chap-Developer_Guide-Advanced_features.html#sect-Developer_Guide-Advanced_features-Resource_mapping

          • 2. Re: RichFaces 4.1 - IE9 re render failure
            John Aja Newbie

            Thanks a lot Lukas! I got the jsf.js file from [1] and added it to the jsf-impl-2.0.2 jar file I am using and it works now!

             

            However, I would like to use mojarra 2.1.7 but I am getting an error when I am using it.

            My code seems only to work with mojarra 2.0.2.

            I am using a rich tab panel and it seems to be causing an error.

             

            Below is my code and the error being generated when I use mojarra 2.1.7 or any other 2.1 mojarra versions:

             

            Code:


            {code:xml}<rich:tabPanel switchType="client" >

                            <rich:tab header="Overview">

                                <rich:collapsiblePanel header="Overview" switchType="client" styleClass="overview-collapsible-panel">

                                    <div class="overview-label-wrapper">

                                        <span class="overview-label">Total Number of Applications:</span> 5

                                    </div>

                                </rich:collapsiblePanel>

                                <rich:collapsiblePanel header="Licensing" switchType="client" styleClass="overview-collapsible-panel">

                                    <div  class="overview-label-wrapper">

                                        <span class="overview-label">Total Number of Licenses Available:</span> 10

                                    </div>

                                </rich:collapsiblePanel>

                            </rich:tab>

                            <rich:tab header="Options">

                                <rich:collapsiblePanel header="General Options" switchType="client"

                                           styleClass="overview-collapsible-panel">

                                        <div class="options-input">

                                            <rich:select value="0">

                                                <f:selectItem itemValue="0" itemLabel="Trace"/>

                                                <f:selectItem itemValue="1" itemLabel="Info" />

                                            </rich:select>

                                        </div>

                                </rich:collapsiblePanel>

                            </rich:tab>

                        </rich:tabPanel>{code}

             

             

            Tomcat Error:

             

             

            INFO: Initializing Mojarra 2.1.7 (SNAPSHOT 20111222) for context '/bpitest'

            Jan 18, 2012 10:58:17 AM org.richfaces.javascript.ClientServiceConfigParser parse

            WARNING: Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented

            Jan 18, 2012 10:58:17 AM org.richfaces.cache.CacheManager getCacheFactory

            INFO: Selected fallback cache factory

            Jan 18, 2012 10:58:17 AM org.richfaces.cache.lru.LRUMapCacheFactory createCache

            INFO: Creating LRUMap cache instance using parameters: {javax.faces.PROJECT_STAGE=Production}

            Jan 18, 2012 10:58:17 AM org.richfaces.cache.lru.LRUMapCacheFactory createCache

            INFO: Creating LRUMap cache instance of 512 items capacity

            Jan 18, 2012 10:58:17 AM org.richfaces.application.InitializationListener onStart

            INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.1.0.Final

            Jan 18, 2012 12:56:21 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException

            SEVERE: Error Rendering View[/index.xhtml]

            java.lang.IllegalStateException: Cannot create a session after the response has been committed

            at org.apache.catalina.connector.Request.doGetSession(Request.java:2400)

            at org.apache.catalina.connector.Request.getSession(Request.java:2120)

            at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

            at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:155)

            at javax.faces.context.ExternalContextWrapper.getSession(ExternalContextWrapper.java:396)

            at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:175)

            at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:122)

            at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:166)

            at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)

            at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419)

            at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)

            at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

            at java.lang.Thread.run(Thread.java:619)

            Jan 18, 2012 12:56:22 PM com.sun.faces.context.ExceptionHandlerImpl throwIt

            INFO: Exception when handling error trying to reset the response.

            java.lang.IllegalStateException: Cannot create a session after the response has been committed

            at org.apache.catalina.connector.Request.doGetSession(Request.java:2400)

            at org.apache.catalina.connector.Request.getSession(Request.java:2120)

            at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

            at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:155)

            at javax.faces.context.ExternalContextWrapper.getSession(ExternalContextWrapper.java:396)

            at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:175)

            at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:122)

            at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:166)

            at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)

            at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419)

            at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)

            at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

            at java.lang.Thread.run(Thread.java:619)

             

             

            This error happens after I send another request.

            So the first time let's say I open it in firefox it is fine then I open it in another tab or I open in IE I basically send another request and I see the error being displayed.

            If I don't use the rich tabpanel component I don't get the error and everything is ok.

            Also, if I use mojarra 2.0.2 everything is ok.

            I see this problem when I use the rich tabpanel and any mojarra 2.1 versions.

            • 3. Re: RichFaces 4.1 - IE9 re render failure
              John Aja Newbie

              I have created a thread with this new issue:

               

              https://community.jboss.org/thread/177572

              • 4. Re: RichFaces 4.1 - IE9 re render failure
                Marco Slehiman Newbie

                I fix a similar issue adding this line in head tag (html)

                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

                Pleae review this linlk

                http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

                • 5. Re: RichFaces 4.1 - IE9 re render failure
                  Luis Eduardo Agudelo González Newbie

                  Please I need a help... I just Migrate from JSF 1.2 to JSF 2.0 (Mojarra) and RichFaces 3.3.3Final to RF 4.2.3 but my application dont call the backing bean method to an action in a commandButton. This the sources part of button:

                   

                  <a4j:commandButton type="submit" value="Aceptar"

                                                                              action="#{InicioSesion_1.consultarProcesos}"

                                                                              styleClass="submit"

                                                                              render="ErrorUsernamePanel,ErrorPasswordPanel,errorSummary,idProcesoSelect"

                                                                              onclick="this.disabled= true;" oncomplete="this.disabled = false;">

                                                                              </a4j:commandButton>

                   

                  When I start the server the log only show this...

                   

                   

                  INFO: Starting Servlet Engine: Apache Tomcat/6.0.13

                  2/12/2012 08:09:23 PM org.apache.catalina.loader.WebappClassLoader validateJarFile

                  INFO: validateJarFile(C:\Users\Luis Agudelo\Workspaces\MyEclipse\.metadata\.me_tcat\webapps\ProcesoAcreditacion\WEB-INF\lib\javaee-api-6.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

                  2/12/2012 08:09:24 PM com.sun.faces.config.ConfigureListener contextInitialized

                  INFO: Inicializando Mojarra 2.0.2 (FCS b10) para el contexto '/ProcesoAcreditacion'

                  log4j:ERROR Could not find value for key log4j.appender.LOGFILE

                  log4j:ERROR Could not instantiate appender named "LOGFILE".

                  log4j:ERROR Could not find value for key log4j.appender.LOGFILE

                  log4j:ERROR Could not instantiate appender named "LOGFILE".

                  log4j:ERROR Could not find value for key log4j.appender.LOGFILE

                  log4j:ERROR Could not instantiate appender named "LOGFILE".

                  2/12/2012 08:09:32 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent

                  INFO: Running on PrimeFaces 3.4.2

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.NotNull, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.Size, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.Pattern, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.Min, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.Max, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.AssertTrue, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.javascript.ClientServiceConfigParser parse

                  ADVERTENCIA: Found JavaScript function definition for class javax.validation.constraints.AssertFalse, but that class is not presented

                  2/12/2012 08:09:33 PM org.richfaces.cache.CacheManager getCacheFactory

                  INFO: Selected fallback cache factory

                  2/12/2012 08:09:33 PM org.richfaces.cache.lru.LRUMapCacheFactory createCache

                  INFO: Creating LRUMap cache instance using parameters: {javax.faces.DEVELOPMENT=true, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml,/WEB-INF/faces-managed-beans.xml,/WEB-INF/faces-navigation.xml, org.richfaces.skin=blueSky, com.sun.faces.validateXml=true, javax.faces.FACELETS_REFRESH_PERIOD=2, com.sun.faces.verifyObjects=false, log4jConfigLocation=/WEB-INF/classes/log4j.properties, org.richfaces.enableControlSkinning=true, javax.faces.FACELETS_SKIP_COMMENTS=false, contextConfigLocation=/WEB-INF/applicationContext*.xml, javax.faces.STATE_SAVING_METHOD=client, javax.faces.DEFAULT_SUFFIX=.xhtml}

                  2/12/2012 08:09:33 PM org.richfaces.cache.lru.LRUMapCacheFactory createCache

                  INFO: Creating LRUMap cache instance of 512 items capacity

                  2/12/2012 08:09:33 PM org.richfaces.application.InitializationListener onStart

                  INFO: RichFaces Core Implementation by JBoss by Red Hat, version 4.2.3.Final

                  2/12/2012 08:09:33 PM org.apache.catalina.core.ApplicationContext log

                  INFO: Set web app root system property: 'webapp.root' = [C:\Users\Luis Agudelo\Workspaces\MyEclipse\.metadata\.me_tcat\webapps\ProcesoAcreditacion\]

                  2/12/2012 08:09:33 PM org.apache.catalina.core.ApplicationContext log

                   

                   

                   

                  Any idea?

                  Thanks!!!