2 Replies Latest reply on Apr 11, 2011 8:59 AM by iabughosh

    rich:validator throws an exception

    iabughosh Master

      Dear fellows,

      i got an exception when i use rich:validator tag :

       

      my xhtml file :

      <h:inputSecret id="passTxt"

                                                                                                   value="#{userInfo.password}"

                                                                                                   required="true"

                                                                                                   label="password">

                                                                            <rich:validator />

      </h:inputSecret>

       

      userInfo bean :

      ...

      private String username;

                private String password;

                private int age;

                private Date birthDate;

                private char gender;

                private boolean javaNinja;

       

                @Override

                public Object clone() throws CloneNotSupportedException {

       

       

                          return super.clone();

                }

       

                public String getUsername() {

                          return username;

                }

       

                public void setUsername(String username) {

                          this.username = username;

                }

       

      //javax.validation.constraints.Size

                @Size(min=6, max=20, message="Password characters must be between 6 & 20")

                public String getPassword() {

                          return password;

                }

      ...

       

      my bundeled jars :

      common-annotations.jar

      commons-beanutils.jar

      commons-collections.jar

      commons-digester.jar

      jstl.jar

      richfaces-components-api.jar

      richfaces-components-ui.jar

      richfaces-core-api.jar

      richfaces-core-impl.jar

      standard.jar

      cssparser-0.9.5.jar

      sac-1.3.jar

       

       

      and here is the stacktrace :

      java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;

      org.richfaces.renderkit.html.ClientOnlyScript.<init>(ClientOnlyScript.java:36)

      org.richfaces.renderkit.html.ClientValidatorRenderer.createValidatorScript(ClientValidatorRenderer.java:191)

      org.richfaces.renderkit.html.ClientValidatorRenderer.createValidatorScript(ClientValidatorRenderer.java:160)

      org.richfaces.renderkit.html.ClientValidatorRenderer.buildAndStoreValidatorScript(ClientValidatorRenderer.java:130)

      org.richfaces.renderkit.html.ClientValidatorRenderer.getScript(ClientValidatorRenderer.java:64)

      javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:99)

      org.richfaces.component.behavior.ClientValidatorImpl.getScript(ClientValidatorImpl.java:98)

      com.sun.faces.renderkit.RenderKitUtils.getSingleBehaviorHandler(RenderKitUtils.java:1586)

      com.sun.faces.renderkit.RenderKitUtils.renderHandler(RenderKitUtils.java:1686)

      com.sun.faces.renderkit.RenderKitUtils.renderOnchange(RenderKitUtils.java:366)

      com.sun.faces.renderkit.html_basic.SecretRenderer.getEndTextToRender(SecretRenderer.java:121)

      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:166)

      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:879)

      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:308)

      com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:181)

      com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:125)

      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)

      javax.faces.render.Renderer.encodeChildren(Renderer.java:164)

      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)

      org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:278)

      org.richfaces.renderkit.html.PanelRenderer.encodeEnd(PanelRenderer.java:181)

      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:879)

      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)

      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)

      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)

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

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

      javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:269)

      javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:269)

      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)

      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)

      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)

      javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)

      org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)

       

      i'm using JSF2, RichFaces 4 final,JBoss 6.

       

      thanks in advance.