Foren

Liferay 6.0.6: portlet:defineObjects NullPointerException

Luca Andreatta, geändert vor 12 Jahren.

Liferay 6.0.6: portlet:defineObjects NullPointerException

Junior Member Beiträge: 33 Beitrittsdatum: 16.02.09 Neueste Beiträge
Hi all,
I have a problem deployng a portlet in Liferay 6.0.6 bundled with JBoss.
When I try to access the portlet I get a NullPointerException in the compiled jsp. emoticon

In particular I get it when it try to execute the compiled code of the liferay tag <portlet:defineObjects/>:
//  portlet:defineObjects
      com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (new com.liferay.taglib.portlet.DefineObjectsTag());
      _jsp_instancemanager.newInstance(_jspx_th_portlet_005fdefineObjects_005f0); //&lt;-- HERE I get the Nullpointer!


It is very odd because if I deploy it in Liferay 6.0.6 bundled with Tomcat everithing works fine! emoticon

Anyone can help me?

The header of the jsp:
&lt;%@ page language="java"
         extends="it.eng.spago.dispatching.httpchannel.AbstractHttpJspPagePortlet"
         contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"
         session="true"
         isELIgnored="false"
%&gt;

&lt;%@ page import="it.eng.spago.base.*,
				 it.eng.cmmi.project.utilities.AttributeUtilities"%&gt;

&lt;%@ taglib uri="/WEB-INF/tld/spago.tld" prefix="spago" %&gt;
&lt;%@ taglib uri="/WEB-INF/tld/cmmi.tld" prefix="cmmi" %&gt;
&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
&lt;%@ taglib prefix="display" uri="http://displaytag.sf.net" %&gt;
&lt;%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %&gt;
&lt;%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %&gt;
&lt;%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %&gt;
&lt;%@ taglib prefix="liferay-theme" uri="http://liferay.com/tld/theme" %&gt;
&lt;%@ taglib prefix="liferay-ui" uri="http://liferay.com/tld/ui" %&gt;

&lt;%@ page import="javax.portlet.PortletContext"%&gt;
&lt;%@ page import="com.liferay.portal.theme.ThemeDisplay"%&gt;
&lt;%@ page import="com.liferay.portal.util.PortalUtil" %&gt;


<portlet:defineobjects />
<liferay-theme:defineobjects />

<c:set var="contextPath">&lt;%=renderResponse.encodeURL(renderRequest.getContextPath())%&gt;</c:set>
Luca Andreatta, geändert vor 12 Jahren.

RE: Liferay 6.0.6: portlet:defineObjects NullPointerException

Junior Member Beiträge: 33 Beitrittsdatum: 16.02.09 Neueste Beiträge
The problem was that my jsp was extending another class that caused the problem:
extends="it.eng.spago.dispatching.httpchannel.AbstractHttpJspPagePortlet"


Removing it solved the problem.

Thanks to all.