java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Arran Mccullough,
  • 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.
    via by Arran Mccullough,
    • 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)
    No Bugmate found.