|Title|NPE onFormUtil
|Date|01-Jul-2005 18:47:22 EEST
|Version|2.27
|Submitter|NascifAbousalhNeto
|[Bug criticality]|[JSPWiki:LightBug]
|Browser version|FireFox
|[Bug status]|ClosedBug
|[PageProvider] used|Versioned
|Servlet Container|Tomcat 5.5.9
|Operating System|WindowsXP
|URL|About
|Java version|1.5.0

I tracked it down to a call to 

    public static Map requestToMap( HttpServletRequest req, 
				    String filterPrefix )
    {
        HashMap params = new HashMap();

        Enumeration en = req.getParameterNames();
        while( en.hasMoreElements() )


I believe req is null, but this method don't check for it. When I disabled the RSS generation the exception went away.

I am using a hacked template, not sure it is related. So far I am using just the pre-defined JSPWiki pages.

Here is the log:

2005-07-01 11:26:18,081 [Thread-35] INFO com.ecyrd.jspwiki.TranslatorReader  - Root cause:
java.lang.NullPointerException
	at com.ecyrd.jspwiki.util.FormUtil.requestToMap(FormUtil.java:137)
	at com.ecyrd.jspwiki.forms.FormOutput.execute(FormOutput.java:99)
	at com.ecyrd.jspwiki.plugin.PluginManager.execute(PluginManager.java:331)
	at com.ecyrd.jspwiki.plugin.PluginManager.execute(PluginManager.java:520)
	at com.ecyrd.jspwiki.TranslatorReader.handleHyperlinks(TranslatorReader.java:908)
	at com.ecyrd.jspwiki.TranslatorReader.handleOpenbracket(TranslatorReader.java:1735)
	at com.ecyrd.jspwiki.TranslatorReader.fillBuffer(TranslatorReader.java:2265)
	at com.ecyrd.jspwiki.TranslatorReader.read(TranslatorReader.java:2355)
	at com.ecyrd.jspwiki.FileUtil.copyContents(FileUtil.java:156)
	at com.ecyrd.jspwiki.FileUtil.readContents(FileUtil.java:278)
	at com.ecyrd.jspwiki.WikiEngine.textToHTML(WikiEngine.java:1370)
	at com.ecyrd.jspwiki.WikiEngine.textToHTML(WikiEngine.java:1318)
	at com.ecyrd.jspwiki.WikiEngine.textToHTML(WikiEngine.java:1288)
	at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1245)
	at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1276)
	at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1257)
	at com.ecyrd.jspwiki.rss.RSSGenerator.getPageDescription(RSSGenerator.java:177)
	at com.ecyrd.jspwiki.rss.RSSGenerator.getEntryDescription(RSSGenerator.java:193)
	at com.ecyrd.jspwiki.rss.RSSGenerator.generateFullWikiRSS(RSSGenerator.java:294)
	at com.ecyrd.jspwiki.rss.RSSGenerator.generate(RSSGenerator.java:214)
	at com.ecyrd.jspwiki.WikiEngine$RSSThread.run(WikiEngine.java:2019)

----

Real reason is that the null request should be detected earlier.  Should be fixed in 2.2.29.

-- JanneJalkanen