I have attempted to set my TR.P file to use JSP templates. However I am getting an NPE when attempting to draw the home page. It appears through a little debugging that I am in the base class JetspeedTemplatePage when I expect to be in JetspeedJSPTemplatePage. Is my assumption correct? If so, have I missed something the properties file?

Abbreviated stack trace follows (line numbers reflect the debugging code I added). The offending code is:
CapabilityMap cm = ((JetspeedRunData)data).getCapability();
System.out.println("value of cm ");
System.out.println(cm);
data.setContentType( cm.getPreferredType().getContentType() );

In this case cm is null, the subsequent call is throwing the NPE.

-David Allen



java.lang.NullPointerException
at org.apache.jetspeed.modules.pages.JetspeedTemplatePage.doBuildBeforeActi on(JetspeedTemplatePage.java:163)
at org.apache.jetspeed.modules.pages.JetspeedVelocityPage.doBuildBeforeActi on(JetspeedVelocityPage.java:83)
at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:13 7)
at org.apache.turbine.modules.Page.build(Page.java:90)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
at org.apache.turbine.Turbine.doGet(Turbine.java:563)

Reply via email to