ICEfaces
  1. ICEfaces
  2. ICE-9661

ace:linkButton - ClassCastException thrown when using a f:param tag

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P01, 4.0.BETA
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P2
    • Salesforce Case Reference:

      Description

      When using an f:param with the ace:linkButton that doesn't use a String object the following exception is thrown:

      java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      at org.icefaces.ace.util.Utils.asParameterString(Utils.java:288)
      at org.icefaces.ace.component.linkbutton.LinkButtonRenderer.encodeHref(LinkButtonRenderer.java:122)
      at org.icefaces.ace.component.linkbutton.LinkButtonRenderer.encodeBegin(LinkButtonRenderer.java:102)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:822)
      at org.icefaces.ace.renderkit.CoreRenderer.renderChild(CoreRenderer.java:75)
      at org.icefaces.ace.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:66)
      at org.icefaces.ace.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:238)
      at org.icefaces.ace.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:135)
      at org.icefaces.ace.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:73)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:877)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:447)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)

      This is only an issue with the ICEfaces 3.3.0 and recent releases. Testing with the EE 3.2.0 release does not cause this error. This is likely due to the changes made in ICE-8944.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case code and war file. The icefaces.jar, icefaces-ace.jar, and icefaces-compat.jar files need to be added into the war.

        To reproduce load welcomeICEfaces.jsf. The error is preventing the page from loading.

        Show
        Arran Mccullough added a comment - Attached test case code and war file. The icefaces.jar, icefaces-ace.jar, and icefaces-compat.jar files need to be added into the war. To reproduce load welcomeICEfaces.jsf. The error is preventing the page from loading.
        Hide
        Judy Guglielmin added a comment -

        rev 38873 for 3.3.0 mtce branch

        Show
        Judy Guglielmin added a comment - rev 38873 for 3.3.0 mtce branch
        Hide
        Judy Guglielmin added a comment - - edited

        add ability to encode non Strings for simple assigning of other types of primitives to UIParameter
        3.3.0 mtce branch rev 39030

        Show
        Judy Guglielmin added a comment - - edited add ability to encode non Strings for simple assigning of other types of primitives to UIParameter 3.3.0 mtce branch rev 39030

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: