Forums de discussion

ClassCastException after migrating faces version

Filipe Leonardo, modifié il y a 8 années.

ClassCastException after migrating faces version

New Member Publications: 2 Date d'inscription: 14/01/16 Publications récentes
Hi,

I'm migrating a Liferay portal from 6.1 to 6.2 (6.2.3). After change liferay faces 3 to faces 4 (4.2.5-ga6) using java faces 2.2, I started to have this error while navigating in portlets:
java.lang.ClassCastException: com.liferay.faces.bridge.application.view.internal.BridgeWriteBehindResponseRenderImpl cannot be cast to com.liferay.portlet.RenderResponseImpl
at com.liferay.portal.layoutconfiguration.util.xml.ActionURLLogic.<init>(ActionURLLogic.java:39)
at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processXML(RuntimePageImpl.java:153)
at com.liferay.portal.layoutconfiguration.util.RuntimePageUtil.processXML(RuntimePageUtil.java:77)
at org.apache.jsp.html.taglib.ui.journal_005farticle.page_jsp._jspService(page_jsp.java:687)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)

This is a JSP/JSF portlet and I have some custom filters. I've checked faces version in all of them but I might be missing something.

Any clue?

Thanks for your help.
thumbnail
Neil Griffin, modifié il y a 8 années.

RE: ClassCastException after migrating faces version

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Filipe,

I'm sorry that you are experiencing this problem. I reviewed the stacktrace and saw where the ClassCastException is happening in ActionURLLogic.java but I think I will need to find a way to reproduce the problem. When you get a chance, please provide a Short, Self Contained, Correct (Compilable), Example (SSCCE). What would be best if you could provide a sample portlet that we can build with Maven.

Thank you,

Neil
Filipe Leonardo, modifié il y a 8 années.

RE: ClassCastException after migrating faces version

New Member Publications: 2 Date d'inscription: 14/01/16 Publications récentes
Hi Neil,

The problem was due to a trying to add a journal article with an wrong articleId. I still don't get why this was causing a ClassCastException but at least is working now.

Thanks for your attention.

Best regards,
Filipe Leonardo
thumbnail
Kyle Joseph Stiemann, modifié il y a 7 années.

Thread Split

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes