Which version are you using ? This should be fixed in the current CVS and the upcoming 1.4b2 release because getCapability() should *always* return a non-null map.
> -----Message d'origine----- > De : David and Kelly Allen [mailto:[EMAIL PROTECTED]] > Envoy� : dimanche 8 d�cembre 2002 02:40 > � : [EMAIL PROTECTED] > Objet : Using JSP - > > > 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.doBuild > BeforeActi > on(JetspeedTemplatePage.java:163) > at > org.apache.jetspeed.modules.pages.JetspeedVelocityPage.doBuild > BeforeActi > on(JetspeedVelocityPage.java:83) > at > org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPa > ge.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) > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
