2 Replies Latest reply on May 17, 2011 3:10 AM by Andrey Bondarenko

    @Pattern validation

    Andrey Bondarenko Newbie

      Hello!

       

      I try to use JSR-303 Validators in my project, but when I add @Pattern annotation to my bean I gen the following error:

       

       

      exception
      javax.servlet.ServletException: com.google.common.collect.ImmutableSet.copyOf(Ljava/util/Collection;)
      Lcom/google/common/collect/ImmutableSet;     
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)     
      org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)     
      org.jboss.seam.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:62)     
      org.jboss.seam.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:72)     
      com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
      
      root cause
      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.TextRenderer.getEndTextToRender(TextRenderer.java:130)     
      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)     
      org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:278)     
      org.richfaces.renderkit.html.PopupPanelRenderer.encodeEnd(PopupPanelRenderer.java:534)     
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:879)     
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)     
      javax.faces.render.Renderer.encodeChildren(Renderer.java:164)     
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)     
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)     
      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)     
      com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:157)     
      javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:269)     
      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)     
      org.jboss.seam.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:62)     
      org.jboss.seam.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:72)     
      com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
      
      

       

      Maybe someone know why?