11 Replies Latest reply on Jan 8, 2009 11:28 AM by nbelaevski

    A runtime error has occured richafces

    khushwinder

      Hi Good People,

      I am developing a web application in jsf using richfaces.
      And i am getting a problem, i am trying to solve it but its not going.
      Actually when i am browsing any jsf page(i am using XHTML+Tomcat 6+richfaces 3.2.2 SRI+ IE 6)
      at that time browser is showing the java script err like:

      A runtime error has occured. do you want to debug?
      Line: 201
      Error:"PanelMenu is not defined"

      After that i click on the no button and then it asks the same thing about the next component like richcombo etc.. in my jsf page. And again i click on no button. and this process goes on until all the components are not rendered. After that it display the page properly.
      Its coming when i have clicked on the show java script err check box in the IE but if i have not checked it then browser is displaying the page but the functions are not working properly i have to refresh the page for properly display.
      I am not getting why it is coming?
      If any body has any idea suggest me please.

      Thanks and Regards..

        • 1. Re: A runtime error has occured richafces
          khushwinder

           

          "Khushwinder" wrote:
          Hi Good People,

          I am developing a web application in jsf using richfaces.
          And i am getting a problem, i am trying to solve it but its not going.
          Actually when i am browsing any jsf page(i am using XHTML+Tomcat 6+richfaces 3.2.2 SRI+ IE 6)
          at that time browser is showing the java script err like:

          A runtime error has occured. do you want to debug?
          Line: 201
          Error:"PanelMenu is not defined"

          After that i click on the no button and then it asks the same thing about the next component like richcombo etc.. in my jsf page. And again i click on no button. and this process goes on until all the components are not rendered. After that it display the page properly.
          Its coming when i have clicked on the show java script err check box in the IE but if i have not checked it then browser is displaying the page but the functions are not working properly i have to refresh the page for properly display.
          I am not getting why it is coming?
          If any body has any idea suggest me please.

          I have figured out one more thing here that its working fine in firefox but in IE 6 it is showing in the footer like

          "downloading data http://localhost:8080/richdemo/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/data-table.js.jsf "

          and my page is stopped after that i have to refresh it.
          I think it is taking time in downloading the default files so it is not working properly.
          Any body has any idea please suggest me.
          Thanks and Regards..





          • 2. Re: A runtime error has occured richafces
            nbelaevski

            Hello,

            Please post your web.xml file.

            • 3. Re: A runtime error has occured richafces
              khushwinder

              Thanks nbelaevski,

              Here is my web.xml :


              <?xml version = '1.0' encoding = 'windows-1252'?>
              <web-app 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"
               version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
               <description>Shopping Cart</description>
              
               <display-name>Shopping Cart</display-name>
              
               <context-param>
               <param-name>javax.faces.CONFIG_FILES</param-name>
               <param-value>/WEB-INF/faces-config.xml</param-value>
               </context-param>
              
               <context-param>
               <param-name>contextConfigLocation</param-name>
               <param-value>/WEB-INF/applicationContext.xml</param-value>
               </context-param>
              
               <context-param>
               <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
               <param-value>resources.application</param-value>
               </context-param>
              
               <context-param>
               <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
               <param-value>.xhtml</param-value>
               </context-param>
              
               <context-param>
               <param-name>facelets.REFRESH_PERIOD</param-name>
               <param-value>2</param-value>
               </context-param>
              
               <context-param>
               <param-name>facelets.SKIP_COMMENTS</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <context-param>
               <param-name>facelets.DEVELOPMENT</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <context-param>
               <param-name>facelets.LIBRARIES</param-name>
               <param-value> /WEB-INF/facelets/tags/tomahawk.taglib.xml;
               </param-value>
               </context-param>
              
               <context-param>
               <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
               <param-value>server</param-value>
               </context-param>
              
               <context-param>
               <param-name>javax.faces.application.CONFIG_FILES</param-name>
               <param-value>/WEB-INF/faces-config.xml</param-value>
               </context-param>
              
               <context-param>
               <param-name>com.sun.faces.validateXml</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <context-param>
               <param-name>com.sun.faces.verifyObjects</param-name>
               <param-value>false</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.ajax4jsf.SKIN</param-name>
               <param-value>laguna</param-value>
               </context-param>
               <context-param>
               <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
               <param-value>com.sun.facelets.FaceletViewHandler</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
               <param-value>NEKO, TIDY</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.richfaces.LoadStyleStrategy</param-name>
               <param-value>DEFAULT</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.richfaces.LoadScriptStrategy</param-name>
               <param-value>DEFAULT</param-value>
               </context-param>
              
               <servlet>
               <servlet-name>Faces Servlet</servlet-name>
               <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
               <load-on-startup>1</load-on-startup>
               </servlet>
               <servlet-mapping>
               <servlet-name>Faces Servlet</servlet-name>
               <url-pattern>*.jsf</url-pattern>
               </servlet-mapping>
              
               <filter>
               <display-name>Ajax4jsf Filter</display-name>
               <filter-name>ajax4jsf</filter-name>
               <filter-class>org.ajax4jsf.Filter</filter-class>
               <init-param>
               <param-name>createTempFiles</param-name>
               <param-value>true</param-value>
               </init-param>
              
               <init-param>
               <param-name>maxRequestSize</param-name>
               <param-value>143482880</param-value>
               </init-param>
               </filter>
              
               <filter-mapping>
               <filter-name>ajax4jsf</filter-name>
               <servlet-name>Faces Servlet</servlet-name>
               <dispatcher>FORWARD</dispatcher>
               <dispatcher>REQUEST</dispatcher>
               <dispatcher>INCLUDE</dispatcher>
               <dispatcher>ERROR</dispatcher>
               </filter-mapping>
              
               <filter>
               <filter-name>MyFacesExtensionsFilter</filter-name>
               <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
               <init-param>
               <param-name>maxFileSize</param-name>
               <param-value>143482880</param-value>
               </init-param>
               </filter>
              
               <servlet>
               <servlet-name>SpringContextServlet</servlet-name>
               <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
               <load-on-startup>1</load-on-startup>
               </servlet>
               <session-config>
               <session-timeout>35</session-timeout>
               </session-config>
               <mime-mapping>
               <extension>html</extension>
               <mime-type>text/html</mime-type>
               </mime-mapping>
               </web-app>
              


              • 4. Re: A runtime error has occured richafces
                khushwinder

                Hi nbelaevski,

                Any idea you got from this web.xml?

                • 5. Re: A runtime error has occured richafces
                  khushwinder

                  Hi All,

                  My work is strucked.
                  If anybody has any idea please help me.
                  or otherwise i have to switch to some other technology :( which i dnt want.

                  Thanks

                  • 6. Re: A runtime error has occured richafces
                    khushwinder

                     

                    "Khushwinder" wrote:
                    Hi All,

                    My work is strucked.
                    If anybody has any idea please help me.
                    or otherwise i have to switch to some other technology :( which i dnt want.

                    Thanks


                    this problem is coming when i am using master page concept otherwise it is not coming.

                    • 7. Re: A runtime error has occured richafces
                      ilya_shaikovsky

                      If you using tomahawk please make sure that built-in prototype.js using by the tomahawk is the same version that in RF. This problem described in our FAQ.

                      And b.t.w why you have myfaces-filter inside web.xml but no maping?

                      • 8. Re: A runtime error has occured richafces
                        khushwinder

                        Thanks ilya_shaikovsky for your reply.

                        I am not using tomhak and myfaces so i deleted everything fomr web.xml.
                        The new web.xml is given below:

                        <?xml version = '1.0' encoding = 'windows-1252'?>
                        <web-app 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"
                         version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
                         <description>Rich Faces Demo</description>
                        
                         <display-name>Rich Faces Demo</display-name>
                        
                         <context-param>
                         <param-name>javax.faces.CONFIG_FILES</param-name>
                         <param-value>/WEB-INF/faces-config.xml</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>contextConfigLocation</param-name>
                         <param-value>/WEB-INF/applicationContext.xml</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
                         <param-value>resources.application</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                         <param-value>.xhtml</param-value>
                         </context-param><context-param>
                         <param-name>facelets.SKIP_COMMENTS</param-name>
                         <param-value>true</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>facelets.DEVELOPMENT</param-name>
                         <param-value>true</param-value>
                         </context-param><context-param>
                         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                         <param-value>server</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>javax.faces.application.CONFIG_FILES</param-name>
                         <param-value>/WEB-INF/faces-config.xml</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>com.sun.faces.validateXml</param-name>
                         <param-value>true</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>com.sun.faces.verifyObjects</param-name>
                         <param-value>false</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.ajax4jsf.SKIN</param-name>
                         <param-value>ruby</param-value>
                         </context-param>
                         <context-param>
                         <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                         <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                         </context-param>
                         <context-param>
                         <param-name>org.richfaces.LoadStyleStrategy</param-name>
                         <param-value>DEFAULT</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.richfaces.LoadScriptStrategy</param-name>
                         <param-value>DEFAULT</param-value>
                         </context-param>
                        
                         <servlet>
                         <servlet-name>Faces Servlet</servlet-name>
                         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                         <load-on-startup>1</load-on-startup>
                         </servlet>
                         <servlet-mapping>
                         <servlet-name>Faces Servlet</servlet-name>
                         <url-pattern>*.jsf</url-pattern>
                         </servlet-mapping>
                        
                         <filter>
                         <display-name>Ajax4jsf Filter</display-name>
                         <filter-name>ajax4jsf</filter-name>
                         <filter-class>org.ajax4jsf.Filter</filter-class>
                         </filter>
                        
                         <filter-mapping>
                         <filter-name>ajax4jsf</filter-name>
                         <servlet-name>Faces Servlet</servlet-name>
                         <dispatcher>FORWARD</dispatcher>
                         <dispatcher>REQUEST</dispatcher>
                         <dispatcher>INCLUDE</dispatcher>
                         <dispatcher>ERROR</dispatcher>
                         </filter-mapping>
                        <servlet>
                         <servlet-name>SpringContextServlet</servlet-name>
                         <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
                         <load-on-startup>1</load-on-startup>
                         </servlet>
                         <session-config>
                         <session-timeout>35</session-timeout>
                         </session-config></web-app>
                        


                        But again i have tried but in IE 7 and 6 it is giving the same problem.
                        When first time i am visiting any jsf page it is stopping in the way and some msg is coming in the lower part of IE like "downloading picture from then the url of my project along with that built in picture which is the part of the richfaces ".
                        any idea?


                        • 9. Re: A runtime error has occured richafces
                          ilya_shaikovsky

                          Khushwinder, sorry again but seems I have to ask you to create simple kickstart project and if you'll see the same errors share it somewhere.

                          • 10. Re: A runtime error has occured richafces
                            khushwinder

                            Thanks for you valuable time...

                            • 11. Re: A runtime error has occured richafces
                              nbelaevski

                               

                              "Khushwinder" wrote:
                              "Khushwinder" wrote:
                              Hi All,

                              My work is strucked.
                              If anybody has any idea please help me.
                              or otherwise i have to switch to some other technology :( which i dnt want.

                              Thanks


                              this problem is coming when i am using master page concept otherwise it is not coming.


                              How does master page look like?