Friday, July 26, 2013

Liferay 6.1/weblogic 12.1.1 java.lang.ClassCastException: com.liferay.portal.kernel.servlet.NonSerializableObjectHandler cannot be cast to java.lang.String

If you get this exception, don't try to debug, especially if you are using Weblogic with closed servlet code.
It is just as simple as problems with having not the same Servlet name in your web.xml as in your portlet.xml.

Liferay wants to have servlets name conteain portlet name in web.xml. Example
<servlet>
     <servlet-name>ListPortlet Servlet</servlet-name>
     .....
</servlet>

<portlet>
  <portlet-name>ListPortlet</portlet-name>
  <display-name>Highcharts List portlet</display-name>
....
</portlet>

So be aware, if your Portlet names don't match, you get this nasty exception. And it means that you need to reconsider your web.xml again.

No comments:

Post a Comment