The exception occurs before there are any explicit page requests made. As part of the startup, WikiEngine issues a getAllPages request and has (presumably) built a Collection of pages from the result of that call. Just which items in that collection (of several thousand) triggered the exception, I have no way of knowing (without inserting a lot of debugging statements and re-running the scenario). I have a couple of pages that consist merely of a redirect (ie, [{SET redirect='xxx'}]), and in addition, it's possible that there are some placeholder pages that only contain permissions (though I recall that caused problems in the past and I added some text to all of those). Lastly a couple of my pages start with the TableOfContents plugin.

Well, the easy way would be to wrap the paragraphify() in a try-catch (NullPointerException e) { System.out.println("NPE: "+wikiContext.getPage().getName()) }.

Could you please do that and run a check?

In any case, would it be hard to check for a null item inside that method and handle it, maybe logging such an event (including info on the page involved), but letting the ReferenceManager processing proceed anyway?

Yes. Because it seems that this has nothing to do with ReferenceManager, but it is probably a deeper bug. And I always *hate* to treat symptoms instead of the cause... It leads to unmaintainable and brittle code.

/Janne

_______________________________________________
Jspwiki-users mailing list
[email protected]
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users

Reply via email to