6 Replies Latest reply on Jul 9, 2011 6:48 AM by Aditya Sundaramurthy

    Unknown object type issue with pickList

    Anuj Kumar Newbie

      Hi All,

       

      I am using the pickList component of richfaces 3.3.3 final release. The partial refresh of the panel that contains pickList, gives this exception-

       

      java.lang.IllegalStateException: Unknown object type

              at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1578)

              at javax.faces.component.ComponentStateHelper.restoreState(ComponentStateHelper.java:290)

              at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1444)

              at javax.faces.component.UIOutput.restoreState(UIOutput.java:255)

              at javax.faces.component.UIInput.restoreState(UIInput.java:1359)

              at org.richfaces.component.html.HtmlPickList.restoreState(HtmlPickList.java:1711)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1202)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

              at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:865)

              at org.ajax4jsf.component.AjaxViewRoot.processRestoreState(AjaxViewRoot.java:761)

              at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:197)

              at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:178)

              at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java

      :131)

              at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)

              at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)

              at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)

              at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)

              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)

              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1351)

              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:473)

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:479)

              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)

              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929)

              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)

              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)

              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection

      .java:247)

              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151)

              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)

              at org.eclipse.jetty.server.Server.handle(Server.java:352)

              at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)

              at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1068)

              at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)

              at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)

              at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)

              at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451)

              at java.lang.Thread.run(Unknown Source)

       

      On refresh, the pickList values are updated. I tried debugging the same. It looks fine to me. The values of the pick list is a subset of select items. Not sure what else might be the cause.

       

      What might be the issue?

       

      Let me know, in case you need more details.

       

      Thanks,

      Anuj

        • 1. Unknown object type issue with pickList
          Anuj Kumar Newbie

          Anyone.. please?

          • 2. Re: Unknown object type issue with pickList
            Aditya Sundaramurthy Newbie

            Hello All, Sorry for waking up this zombie thread, but I'm also facing the same problem and I don't see any solution to this.

             

            I have a PanelGrid with 2 input text boxes, 2 combo-boxes, a number spinner and a pick-list. I'm able to repeatedly reproduce this issue every time a validator on the text boxes fails and the I re-submit the form after correcting the error. Stack-trace below:

             

            java.lang.IllegalStateException: Unknown object type

                at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1578)

                at javax.faces.component.ComponentStateHelper.restoreState(ComponentStateHelper.java:290)

                at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1444)

                at javax.faces.component.UIOutput.restoreState(UIOutput.java:255)

                at javax.faces.component.UIInput.restoreState(UIInput.java:1359)

                at org.richfaces.component.html.HtmlPickList.restoreState(HtmlPickList.java:1711)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1202)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1217)

                at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:865)

                at org.ajax4jsf.component.AjaxViewRoot.processRestoreState(AjaxViewRoot.java:761)

                at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:197)

                at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:178)

                at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)

                at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)

                at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)

                at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)

                at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

                at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

                at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

                at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

                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:233)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:64)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

                at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:409)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:662)

             

             

             

            The scenario requires the user to select a set of "applicable currencies", for which a pick-list seems most appropriate. I do not spot anything wrong with the xhtml snippet below:

             

             

                                <rich:pickList id="applicableCurrencyPickList"
                                    showButtonsLabel="false" disabled="#{beanData.viewOnly}" tabindex="7"
                                    listsHeight="100px" sourceListWidth="90px" targetListWidth="90px"
                                    value="#{beanData.dataVO.applicableCurrency}">
                                    <c:forEach items="#{beanData.currencyList}" var="currencyList">
                                        <f:selectItem itemLabel="#{currencyList.value}"
                                            itemValue="#{currencyList.value}" />
                                    </c:forEach>
                                </rich:pickList>

             

            applicableCurrency referenced in the value attribute is a List<String>.

             

            Any help is appreciated. Anuj, were you able to solve this problem?

            • 3. Re: Unknown object type issue with pickList
              Anuj Kumar Newbie

              No Aditya. The problem persists.

              Anyone... please?

              • 4. Re: Unknown object type issue with pickList
                liumin hu Master

                hi,

                 

                did you try to use f:selectitems to replace your c:foreach?

                • 5. Re: Unknown object type issue with pickList
                  Aditya Sundaramurthy Newbie

                  Hi liumin,

                   

                  f:selectItems doesn't help too.

                  • 6. Re: Unknown object type issue with pickList
                    Aditya Sundaramurthy Newbie

                    I finally overcame this issue by using a Shuttle List (rich:listshuttle). This component doesn't seem to have this problem. Will investigate when I find time. Thanks!