Search code examples
liferaytaglibliferay-6

NullPointerException using liferay-ui taglib


I'm trying to use the liferay-ui:icon-help tag in my (Liferay 6.1) portlet, but adding

<liferay-ui:icon-help message="help me"/>

to my edit.jsp gives me

ERROR [render_portlet_jsp:154] java.lang.NullPointerException at com.liferay.taglib.ui.IconHelpTag.processEndTag(IconHelpTag.java:57)

I'm sure I imported the taglib correctly because other tags such as liferay-ui:calendar work just fine.

Did I forget anything?

edit: IconHelpTag.java:57 suggests that there's something wrong involving the theme, but I did not play around with that, the server is pretty much as it came out of the box.


Solution

  • Looks like the liferay-ui:icon-help tag makes call to a theme related object, add the following lines to your jsp:

    <%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%>
    <liferay-theme:defineObjects />