1 Reply Latest reply on Apr 18, 2008 3:26 PM by Sergey Smirnov

    rich: listShuttle Error

    Mahesh M Newbie

      Hello,
      I am using Rich faces 3.1.4 GA. I am trying to use rich list shuttle control and it seems to throw NoSuchmethodError encodeRows exception.

      If someone can point out what am I missing it would be a great help.

      Thanks,
      Mahesh

      My usage is as follows

      <rich:listShuttle id="shuttle" listsHeight="300"
      sourceValue="#{backingBean.available}"
       targetValue="#{backingBean.chosen}" sourceListWidth="300" targetListWidth="300"
       sourceCaptionLabel="Available " targetCaptionLabel="Chosen " var="item"
       copyAllControlLabel="Copy All" copyControlLabel="Copy" removeControlLabel="Remove" removeAllControlLabel="Remove All"
       converter="shuttleConverter">
      
       <h:column>
       <h:outputText value="#{item.name}" />
       </h:column>
      
       </rich:listShuttle>
      
      My backing bean is as follows
      
      public class BackingBean{
      
      private List<MyObject> available;
      private List<MyObject> chosen;
      
       public BackingBean(){
       available = new ArrayList<MyObject>();
       chosen = new ArrayList<MyObject>();
       }
      
       //Getters and Setters
      
      }
      
      My Converter is as follows and I have configured it int the xml file.
      
      public class ShuttleConverter implements Converter{
      
      public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value) throws ConverterException {
      
       if (facesContext == null) throw new NullPointerException("facesContext");
       if (uiComponent == null) throw new NullPointerException("uiComponent");
      
       // for demo purpose, I am just creatting one object only here.
       MyObject obj= new MyObject();
       obj.setName("Test Object");
       return obj;
       }
      
       public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value) throws ConverterException {
      
       if (facesContext == null) throw new NullPointerException("facesContext");
       if (uiComponent == null) throw new NullPointerException("uiComponent");
      
       if(value == null)
       return "";
      
       MyObject obj= (MyObject )value;
       return obj.getName();
       }
      
      }
      
      Following is the exception stack trace.
      
      java.lang.NoSuchMethodError: org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;Lorg/richfaces/renderkit/TableHolder;)V
       at org.richfaces.renderkit.ListShuttleRendererBase.encodeRows(ListShuttleRendererBase.java:99)
       at org.richfaces.renderkit.html.ListShuttleRenderer.doEncodeChildren(ListShuttleRenderer.java:243)
       at org.richfaces.renderkit.html.ListShuttleRenderer.doEncodeChildren(ListShuttleRenderer.java:233)
       at org.richfaces.renderkit.ListShuttleRendererBase.encodeChildren(ListShuttleRendererBase.java:226)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:436)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:75)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:266)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:261)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
       at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
       at org.ajax4jsf.context.AjaxContextImpl.renderAjaxRegion(AjaxContextImpl.java:289)
       at org.ajax4jsf.context.AjaxContextImpl$2.invoke(AjaxContextImpl.java:204)
       at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
       at org.ajax4jsf.context.AjaxContextImpl.invokeOnComponent(AjaxContextImpl.java:160)
       at org.ajax4jsf.context.AjaxContextImpl.renderSubmittedAjaxRegion(AjaxContextImpl.java:218)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:239)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at com.dbz.lms.filter.SessionViewFilter.doFilter(SessionViewFilter.java:34)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at com.dbz.lms.filter.LoginFilter.doFilter(LoginFilter.java:66)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      15:13:29,815 ERROR [ExceptionUtil] org.apache.jsp.error_jsp: system exception occured
      com.dbz.lms.exceptions.SystemException: org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;Lorg/richfaces/renderkit/TableHolder;)V
       at com.dbz.lms.util.ExceptionUtil.handle(ExceptionUtil.java:46)
       at org.apache.jsp.error_jsp._jspService(error_jsp.java:47)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
       at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:212)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)