Friday, February 19, 2010

NullPointerException on JSP page on JSF+PrimeFaces

My first experience with JSF is with JSF 2.0 + PrimeFaces 2.0 and PDL/Facelets. ;-) When I went back to JSF 1.2 + PrimeFaces 1.0 using JSP templates I get this error.

java.lang.NullPointerException
at org.primefaces.component.resources.ResourcesTag.setProperties(ResourcesTag.java:37)
at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:614)
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
at org.apache.jsp.RequiredSecurityInfo_jsp._jspx_meth_p_005fresources_005f0(RequiredSecurityInfo_jsp.java:274)

I wish the errors would be more helpful.

Solution:

When using JSP view technology, JSF tags including p:resources should be wrapped inside f:view.

Source: Problem with <p:resources/>

1 comment: