Results 1 to 4 of 4

Thread: Faces exception

  1. #1
    Join Date
    Jun 2010
    Posts
    25
    Rep Power
    0

    Thumbs down Faces exception

    hi ,

    i am trying to load the selectItem list for selectOneMenu.and i am binding this this to one variable in the bean like below.


    <h:selectOneMenu id="specificUom1" rendered={simpleTariffBean.updateFlag}"
    value="#{simpleTariffBean.model.specificMeasuremen t}" size="5">
    <f:selectItems value="#{uomSelectItemList.selectCodeItemList}" />
    </h:selectOneMenu>

    simpleTariffBean.model.specificMeasurement variable having one value that exist in the select item list

    i am getting below error.........
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
    at com.sun.faces.renderkit.html_basic.MenuRenderer.re nderSelect(MenuRenderer.java:807)
    at com.sun.faces.renderkit.html_basic.MenuRenderer.en codeEnd(MenuRenderer.java:280)
    at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:861)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:242)
    at com.sun.faces.renderkit.html_basic.GroupRenderer.e ncodeChildren(GroupRenderer.java:106)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at org.ajax4jsf.renderkit.RendererBase.renderChild(Re ndererBase.java:277)
    at org.ajax4jsf.renderkit.RendererBase.renderChildren (RendererBase.java:258)
    at org.ajax4jsf.renderkit.html.AjaxOutputPanelRendere r.encodeChildren(AjaxOutputPanelRenderer.java:78)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:234)
    at com.sun.faces.renderkit.html_basic.GridRenderer.re nderRow(GridRenderer.java:178)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at javax.faces.component.UIComponent.encodeAll(UIComp onent.java:936)
    at javax.faces.render.Renderer.encodeChildren(Rendere r.java:148)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:837)
    at javax.faces.component.UIComponent.encodeAll(UIComp onent.java:936)
    at javax.faces.component.UIComponent.encodeAll(UIComp onent.java:942)
    at com.sun.facelets.FaceletViewHandler.renderView(Fac eletViewHandler.java:578)
    at org.ajax4jsf.application.ViewHandlerWrapper.render View(ViewHandlerWrapper.java:100)
    at org.ajax4jsf.application.AjaxViewHandler.renderVie w(AjaxViewHandler.java:176)
    at com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:109)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:1 00)
    at com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServl et.java:266)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(Base XMLFilter.java:206)
    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseF ilter.java:290)
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHa ndleRequest(BaseFilter.java:388)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter .java:515)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at com.crimsonlogic.trade.common.util.PageFiltering.d oFilter(PageFiltering.java:213)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at org.springframework.orm.hibernate3.support.OpenSes sionInViewFilter.doFilterInternal(OpenSessionInVie wFilter.java:198)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter. doFilter(ExtensionsFilter.java:285)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter. doFilter(ExtensionsFilter.java:341)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFi lter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :3496)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Un known Source)
    at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.exe cute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(S ervletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :173)

    Thanks & Regards,
    Murali
    Thanks&Regards,
    Muralikrishna K

  2. #2
    maulikmodi08 is offline Member
    Join Date
    Mar 2011
    Posts
    4
    Rep Power
    0

    Lightbulb One probability for the Exception

    Hi.
    I think you might be getting the exception because of the following line..

    value="#{simpleTariffBean.model.specificMeasuremen t}

    In the above line you might have written "specificMeasurement".. check it out. you might get solution.

    value="#{simpleTariffBean.model.specificMeasuremen t}

    :)

  3. #3
    Join Date
    Jun 2010
    Posts
    25
    Rep Power
    0

    Default

    yes,

    i found solution.

    Thanks
    Thanks&Regards,
    Muralikrishna K

  4. #4
    maulikmodi08 is offline Member
    Join Date
    Mar 2011
    Posts
    4
    Rep Power
    0

    Question What was the problem

    You're welcome,

    would u like to share what was the exact problem and how did you find the solution?

    Regards,
    Maulik Modi

Similar Threads

  1. JSF 2.0 faces.config.xml problem
    By manimca1984@gmail.com in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 02-10-2010, 08:58 AM
  2. javax.faces.viewstate
    By mohan_praneeth in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 11-03-2009, 02:52 PM
  3. com.sun.faces.application.ApplicationAssociate
    By alam99 in forum JavaServer Faces (JSF)
    Replies: 5
    Last Post: 03-18-2009, 10:58 AM
  4. javax.faces.el.EvaluationException
    By xtech in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 04-10-2008, 04:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •