5 Replies Latest reply on Sep 5, 2008 6:52 PM by leandro godoy

    problems with rich:ajaxValidator

    leandro godoy Apprentice

      I am having problems using the rich: ajaxValidator, I am using the version 3.2.2 cr3, and that this error?
      Thanks



      
      java.lang.NoClassDefFoundError: com/sun/facelets/FaceletException
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
       at java.lang.Class.getConstructor0(Unknown Source)
       at java.lang.Class.newInstance0(Unknown Source)
       at java.lang.Class.newInstance(Unknown Source)
       at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1014)
       at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:539)
       at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:215)
       at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:500)
       at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:651)
       at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1111)
       at org.richfaces.taglib.AjaxValidatorTagBase.doStartTag(AjaxValidatorTagBase.java:89)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fajaxValidator_005f0(novo1_jsp.java:1484)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005finputText_005f3(novo1_jsp.java:1430)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005fpanelGrid_005f1(novo1_jsp.java:979)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fpanelBarItem_005f0(novo1_jsp.java:868)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fpanelBar_005f0(novo1_jsp.java:825)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005fcolumn_005f1(novo1_jsp.java:780)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005fpanelGrid_005f0(novo1_jsp.java:671)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_a4j_005fform_005f0(novo1_jsp.java:563)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fpanel_005f0(novo1_jsp.java:474)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_f_005fview_005f0(novo1_jsp.java:425)
       at org.apache.jsp.view.produto.novo1_jsp._jspService(novo1_jsp.java:385)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
       at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
       at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at com.Lgweb.Tcc.Util.SecuritFilter.doFilter(SecuritFilter.java:41)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Unknown Source)
      20:51:29,953 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1f16253) threw exception
      javax.faces.FacesException: org.apache.jasper.JasperException: An exception occurred processing JSP page /view/produto/novo1.jsp at line 201
      
      198: label="#{msg.valorvenda}" maxlength="15"
      199: required="true" id="venda" >
      200: <f:validateLongRange minimum="0" maximum="2500" />
      201: <rich:ajaxValidator event="onblur"/>
      202: </h:inputText>
      203:
      204:
      
      
      Stacktrace:
       at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:413)
       at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
       at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at com.Lgweb.Tcc.Util.SecuritFilter.doFilter(SecuritFilter.java:41)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Unknown Source)
      Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /view/produto/novo1.jsp at line 201
      
      198: label="#{msg.valorvenda}" maxlength="15"
      199: required="true" id="venda" >
      200: <f:validateLongRange minimum="0" maximum="2500" />
      201: <rich:ajaxValidator event="onblur"/>
      202: </h:inputText>
      203:
      204:
      
      
      Stacktrace:
       at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:518)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:429)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
       ... 35 more
      Caused by: javax.faces.FacesException: javax.faces.FacesException: Cant instantiate class: org.richfaces.component.html.HtmlBeanValidator.
       at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:545)
       at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:215)
       at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:500)
       at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:651)
       at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1111)
       at org.richfaces.taglib.AjaxValidatorTagBase.doStartTag(AjaxValidatorTagBase.java:89)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fajaxValidator_005f0(novo1_jsp.java:1484)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005finputText_005f3(novo1_jsp.java:1430)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005fpanelGrid_005f1(novo1_jsp.java:979)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fpanelBarItem_005f0(novo1_jsp.java:868)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fpanelBar_005f0(novo1_jsp.java:825)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005fcolumn_005f1(novo1_jsp.java:780)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_h_005fpanelGrid_005f0(novo1_jsp.java:671)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_a4j_005fform_005f0(novo1_jsp.java:563)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_rich_005fpanel_005f0(novo1_jsp.java:474)
       at org.apache.jsp.view.produto.novo1_jsp._jspx_meth_f_005fview_005f0(novo1_jsp.java:425)
       at org.apache.jsp.view.produto.novo1_jsp._jspService(novo1_jsp.java:385)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
       ... 45 more
      Caused by: javax.faces.FacesException: Cant instantiate class: org.richfaces.component.html.HtmlBeanValidator.
       at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1016)
       at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:539)
       ... 64 more
      Caused by: java.lang.NoClassDefFoundError: com/sun/facelets/FaceletException
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
       at java.lang.Class.getConstructor0(Unknown Source)
       at java.lang.Class.newInstance0(Unknown Source)
       at java.lang.Class.newInstance(Unknown Source)
       at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1014)
       ... 65 more
      20:51:29,953 INFO [STDOUT] Exception in the filter chain
      org.apache.jasper.JasperException: An exception occurred processing JSP page /view/produto/novo1.jsp at line 201
      


        • 1. Re: problems with rich:ajaxValidator
          Daniel Young Novice


          Just looking at the code, it seems that the UIBeanValidator has a dependency on Facelets, and it seems you are using JSP for your view.

          I'm not sure why, but the setParentProperties() method is throwing FaceletException rather than FacesException.

          You may be able to fudge your way around this by just adding the facelets JAR file to your classpath.

          • 3. Re: problems with rich:ajaxValidator
            leandro godoy Apprentice


            actually you were right facelets.jar put in classpath and worked, but I'm having a doubt, my error messages, are displayed in a modal panel, which rendered and when (showWhenRendered = "# (facesContext.maximumSeverity!) = null) put the modalPanel does not appear, what can I do to circumvent this problem?
            My modal panel that within a <a4j:ajaxOutputPanel ajaxRendered=true>.

            • 4. Re: problems with rich:ajaxValidator
              Nick Belaevski Master

              That:

              <a4j:outputPanel ajaxRendered="true">
               <rich:modalPanel showWhenRendered="#{facesContext.maximumSeverity != null}">
               <h:messages />
               </rich:modalPanel>
               </a4j:outputPanel>
              
               <h:form>
               <h:inputText value="" required="true" />
               <a4j:commandLink value="Link"></a4j:commandLink>
               </h:form>
              
              is working for me as expected under latest 3.2.2 snapshot.

              • 5. Re: problems with rich:ajaxValidator
                leandro godoy Apprentice

                What I want to show he is the error message at (inputText) within the (modalPanel) in the onblur (inputText) but it does not renders the (modalPanel) in output of the field is needed I put a (h: message for = " ".....), how do I resolve this?
                thank you.
                See my code.

                
                <a4j:outputPanel ajaxRendered="true">
                 <rich:modalPanel id="error" autosized="true"
                 showWhenRendered="#{facesContext.maximumSeverity !=null}">
                 <f:facet name="header">
                 <h:outputText value="#{msg.erros}"></h:outputText>
                 </f:facet>
                 <f:facet name="controls">
                 <h:graphicImage value="/images/BOTOES/cancel.png" width="20" height="20"styleClass="imagem"
                 style="cursor:pointer" onclick="Richfaces.hideModalPanel('error')" />
                 </f:facet>
                 <table class="blank" style="font-size: 15pt; white-space: nowrap">
                 <nobr>
                 <rich:messages showSummary="true" showDetail="true">
                
                 <f:facet name="errorMarker">
                 <h:graphicImage value="/images/requirid.png"
                 width="20" height="20"styleClass="imagem"/>
                 </f:facet>
                 <f:facet name="warnMarker">
                 <h:graphicImage value="/images/info.png"
                 width="20" height="20"styleClass="imagem" />
                 </f:facet>
                 <f:facet name="infoMarker">
                 <h:graphicImage value="/images/accept.png"
                 width="20" height="20"styleClass="imagem" />
                 </f:facet>
                 </rich:messages>
                 </nobr>
                 </table>
                 </rich:modalPanel>
                 </a4j:outputPanel>
                
                


                
                <h:inputText value="#{produto.produto.valorcusto}"
                 label="#{msg.valorcompra}" maxlength="15"
                 required="true" id="compra">
                 <f:validateDoubleRange minimum="0.01" maximum="999.99"/>
                 <f:validateLongRange minimum="0" maximum="2500" />
                 <rich:ajaxValidator event="onblur" focus="venda" />
                 </h:inputText>