6 Replies Latest reply: Jan 27, 2012 6:26 PM by Neil Griffin RSS

ClassCastException on the same class

Eduardo Mello Cantú Newbie

Hi there,

 

I've turn my application (Seam 2.2.2.Final, Richfaces 3.3.3, Facelets) into a Portal using GateIn Portlet Container.

When I deploy a Portlet (Seam 2.2.2.Final, Richaces 3.3.3, Facelets and JBoss Portlet Bridge 2.1.0.FINAL)  I've got:

09:15:22,996 SEVERE [org.jboss.portletbridge.bridge] (http--0.0.0.0-8080-4) Error processing execute lifecycle: javax.faces.FacesException: java.lang.ClassCastException: org.ajax4jsf.webapp.FilterServletResponseWrapper cannot be cast to org.ajax4jsf.webapp.FilterServletResponseWrapper

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128) [jsf-impl-1.2_15-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-1.2_15-jbossorg-2.jar:]

          at org.jboss.portletbridge.AjaxPortletBridge.render(AjaxPortletBridge.java:1167) [portletbridge-impl-2.1.0.FINAL.jar:]

          at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:652) [portletbridge-impl-2.1.0.FINAL.jar:]

          at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:598) [portletbridge-api-2.1.0.FINAL.jar:]

          at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:486) [portletbridge-api-2.1.0.FINAL.jar:]

          at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328) [portlet-api.jar:]

          at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:457) [portletbridge-api-2.1.0.FINAL.jar:]

          at javax.portlet.GenericPortlet.render(GenericPortlet.java:233) [portlet-api.jar:]

          at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:568) [pc-portlet.jar:]

          at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [pc-portlet.jar:]

          at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80) [pc-portlet.jar:]

          at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505) [pc-portlet.jar:]

          at org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:196) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123) [pc-portlet.jar:]

          at org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82) [wci-wci.jar:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_16]

          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_16]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_16]

          at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_16]

          at org.gatein.wci.command.CommandServlet.doGet(CommandServlet.java:135) [wci-wci.jar:]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:639) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:576) [jbossweb-7.0.3.Final.jar:]

          at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84) [wci-wci.jar:]

          at org.gatein.wci.command.CommandDispatcher.include(CommandDispatcher.java:58) [wci-wci.jar:]

          at org.gatein.wci.tomcat.TC6ServletContainerContext.include(TC6ServletContainerContext.java:87) [wci-tomcat.jar:]

          at org.gatein.wci.impl.DefaultServletContainer.include(DefaultServletContainer.java:191) [wci-wci.jar:]

          at org.gatein.pc.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:75) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:117) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:230) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:162) [pc-portlet.jar:]

          at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87) [pc-portlet.jar:]

          at org.gatein.pc.portal.jsp.PagePortletControllerContext.invoke(PagePortletControllerContext.java:117)

          at org.gatein.pc.controller.impl.AbstractPortletControllerContext.invoke(AbstractPortletControllerContext.java:191)

          at org.gatein.pc.controller.PortletController.render(PortletController.java:235)

          at org.gatein.pc.portal.jsp.PortalRenderResponse.render(PortalRenderResponse.java:121)

          at org.gatein.pc.portal.jsp.PortalRenderResponse.render(PortalRenderResponse.java:138)

          at org.gatein.pc.portal.jsp.PortalRenderResponse.<init>(PortalRenderResponse.java:91)

          at org.gatein.pc.portal.jsp.ControllerFilter.doFilter(ControllerFilter.java:272)

          at org.gatein.pc.portal.jsp.ControllerFilter.doFilter(ControllerFilter.java:92)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:]

          at org.gatein.pc.portal.ErrorHandlingFilter.doFilter(ErrorHandlingFilter.java:61)

          at org.gatein.pc.portal.ErrorHandlingFilter.doFilter(ErrorHandlingFilter.java:53)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:]

          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73) [jboss-seam.jar:]

          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]

          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [richfaces-impl.jar:]

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl.jar:]

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl.jar:]

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl.jar:]

          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]

          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]

          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.3.Final.jar:]

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.Beta1.jar:]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.Beta1.jar:]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.3.Final.jar:]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.3.Final.jar:]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.3.Final.jar:]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.3.Final.jar:]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.3.Final.jar:]

          at java.lang.Thread.run(Unknown Source) [:1.6.0_16]

Caused by: java.lang.ClassCastException: org.ajax4jsf.webapp.FilterServletResponseWrapper cannot be cast to org.ajax4jsf.webapp.FilterServletResponseWrapper

          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:184) [richfaces-impl.jar:]

          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) [jsf-impl-1.2_15-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) [jsf-impl-1.2_15-jbossorg-2.jar:]

          ... 101 more

 

At first, both application (portal) and portlets were deployed under JBoss AS 4.2.3.GA, then (as I've mentioned on http://community.jboss.org/thread/175748) I''ve tried to move then to JBoss AS 7.1.0.Beta1, but the exception remains.

 

Do you guys think it's a bridge problem or what?