Hello,
I have a problem with my application sinced I moved my eclipse
environment from a Windows XP system to and Windows 7 system. Compiling
works fine and also a lot of my jsf tobago pages.
But if i run the app on my development system some pages using
tx:selectOneChoice Elements are producing errors like this one:
java.lang.IllegalArgumentException - TYPE ERROR: value NOT instanceof
SelectItem, SelectItem[], Collection, Map. type=java.lang.String
I'm using jre 1.6.0_20, MyFaces 1.2.8 and tobago 1.0.24 with Eclipse
Galileo. These are the same components (except I Java which was version
1.6.0_7) I used on the windows XP based system without problems.
For me everything looks o.k. The data delivered from the getter is r
should be of Type List<SelectItem> which is implementing Collection.
Would be great if somebody has an idea and can help me.
Best regards Michael
The source of the page:
<tx:selectOneChoice value="#{myController.country_id}" label="country">
<f:selectItems value="#{countryBean.country_list}" />
</tx:selectOneChoice>
The relevant part of the bean code:
private List<SelectItem> country_list = new ArrayList<SelectItem>();
public CountryBean() {
super();
//fill List with some countries
country_list.add(new SelectItem(820,"Germany"));
country_list.add(new SelectItem(276,"Germany"));
}
public List<SelectItem> getCountry_list() {
return country_list;
}
The StackTrace
Exception while calling encodeEnd on component : {Component-Path :
[Class: org.apache.myfaces.tobago.component.UIViewRoot,ViewId:
/admin.jsp][Class: org.apache.myfaces.tobago.component.UIPage,Id: page]}
Caused by:
java.lang.IllegalArgumentException - TYPE ERROR: value NOT instanceof
SelectItem, SelectItem[], Collection, Map. type=java.lang.String
|javax.faces.FacesException: Exception while calling encodeEnd on component :
{Component-Path : [Class:
org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
org.apache.myfaces.tobago.component.UIPage,Id: page]}
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:627)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:261)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:257)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(JspViewHandlerImpl.java:427)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:383)
at
org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:105)
at
org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:56)
at
org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecycle.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:182)
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:646)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
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
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.faces.FacesException: Exception while calling encodeEnd on
component : {Component-Path : [Class:
org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
org.apache.myfaces.tobago.component.UIPage,Id: page][Class:
org.apache.myfaces.tobago.component.UICell,Id: j_id_jsp_314771723_3][Class:
org.apache.myfaces.tobago.component.UITabGroup,Id: Main]}
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:627)
at
org.apache.myfaces.tobago.component.UITabGroup.encodeEnd(UITabGroup.java:140)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:86)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
at
org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEnd(PageRenderer.java:171)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:624)
... 36 more
Caused by: javax.faces.FacesException: Exception while calling encodeEnd on
component : {Component-Path : [Class:
org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
org.apache.myfaces.tobago.component.UIPage,Id: page][Class:
org.apache.myfaces.tobago.component.UICell,Id: j_id_jsp_314771723_3][Class:
org.apache.myfaces.tobago.component.UITabGroup,Id: Main][Class:
org.apache.myfaces.tobago.component.UITab,Id: j_id_jsp_1140637804_0][Class:
org.apache.myfaces.tobago.component.UIForm,Id: j_id_jsp_1140637804_21][Class:
org.apache.myfaces.tobago.component.UICell,Id: j_id_jsp_1140637804_22][Class:
org.apache.myfaces.tobago.component.UIBox,Id: partnerDataBox][Class:
org.apache.myfaces.tobago.component.UITabGroup,Id: PartnerDetailsTab]}
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:627)
at
org.apache.myfaces.tobago.component.UITabGroup.encodeEnd(UITabGroup.java:140)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:86)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
at
org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent(DefaultLayoutRenderer.java:47)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encodeChildren(RenderUtil.java:58)
at
org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:74)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:454)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeEnd(TabGroupRenderer.java:168)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:624)
... 48 more
Caused by: javax.faces.FacesException: Exception while calling encodeEnd on
component : {Component-Path : [Class:
org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
org.apache.myfaces.tobago.component.UIPage,Id: page][Class:
org.apache.myfaces.tobago.component.UICell,Id: j_id_jsp_314771723_3][Class:
org.apache.myfaces.tobago.component.UITabGroup,Id: Main][Class:
org.apache.myfaces.tobago.component.UITab,Id: j_id_jsp_1140637804_0][Class:
org.apache.myfaces.tobago.component.UIForm,Id: j_id_jsp_1140637804_21][Class:
org.apache.myfaces.tobago.component.UICell,Id: j_id_jsp_1140637804_22][Class:
org.apache.myfaces.tobago.component.UIBox,Id: partnerDataBox][Class:
org.apache.myfaces.tobago.component.UITabGroup,Id: PartnerDetailsTab][Class:
org.apache.myfaces.tobago.component.UITab,Id: j_id_jsp_1140637804_54][Class:
org.apache.myfaces.tobago.component.UIPanel,Id: partnerDataPanel2][Class:
org.apache.myfaces.tobago.component.UICell,Id: j_id_jsp_1140637804_67][Class:
org.apache.myfaces.tobago.component.UIPanel,Id: j_id56][Class:
org.apache.myfaces.tobago.component.UISelectOne,Id: j_id59]}
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:627)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:86)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
at
org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent(DefaultLayoutRenderer.java:47)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
at
org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent(DefaultLayoutRenderer.java:47)
at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
at
org.apache.myfaces.tobago.renderkit.RenderUtil.encodeChildren(RenderUtil.java:58)
at
org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:74)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:454)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeEnd(TabGroupRenderer.java:168)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:624)
... 67 more
Caused by: java.lang.IllegalArgumentException: TYPE ERROR: value NOT instanceof
SelectItem, SelectItem[], Collection, Map. type=java.lang.String
at
org.apache.myfaces.tobago.component.ComponentUtil.getSelectItems(ComponentUtil.java:606)
at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.SelectOneChoiceRenderer.encodeEnd(SelectOneChoiceRenderer.java:61)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:624)
... 89 more
|