incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry Metske <harry.met...@gmail.com>
Subject Re: JUnit testing 3.0 => "Page removed already!?! " errors
Date Sat, 11 Apr 2009 10:18:09 GMT
The event handling looks good, SearchManager handles the PAGE_DELETE_REQUEST
event properly.
The root cause is that there is no VersionHistory support yet.

When calling ContentManager.getAllPages(), you get duplicate pages in the
returned List, when trying to delete these, only the first one (of course)
succeeds, when trying to delete the second one you get the mentioned
Exception.

Harry

2009/4/10 Janne Jalkanen <janne.jalkanen@ecyrd.com>

>
> We've got two event for delete - one which is DELETE_REQUEST and one which
> is actual DELETED.  The removal of the page occurs between these two.  It
> looks like SearchManager might be subscribing to the wrong event and as a
> result, accessing the page after it has been already removed.
>
> Now, 2.x does not really care, since it's possible to access the page after
> its deletion since WikiPage is still live even if its contents aren't. 3.0
> is a lot stricter in this regard.
>
> /Janne
>
>
> On 10 Apr 2009, at 20:30, Harry Metske wrote:
>
>  the WikiEngineTest also reports a lot of these errors (because it happens
>> in
>> the tearDown method) :
>>
>> Page removed already!?!
>>
>> org.apache.wiki.InternalWikiException: Page removed already!?!
>> at
>>
>> org.apache.wiki.search.SearchManager.actionPerformed(SearchManager.java:388)
>> at
>>
>> org.apache.wiki.event.WikiEventManager$WikiEventDelegate.fireEvent(WikiEventManager.java:568)
>> at
>>
>> org.apache.wiki.event.WikiEventManager.fireEvent(WikiEventManager.java:349)
>> at
>> org.apache.wiki.content.ContentManager.fireEvent(ContentManager.java:1079)
>> at
>> org.apache.wiki.content.ContentManager.deletePage(ContentManager.java:827)
>> at org.apache.wiki.TestEngine.emptyRepository(TestEngine.java:198)
>> at org.apache.wiki.WikiEngineTest.tearDown(WikiEngineTest.java:74)
>> Caused by: org.apache.wiki.content.PageNotFoundException: Main:mrmxyzptlk
>> at
>> org.apache.wiki.content.ContentManager.getPage(ContentManager.java:1183)
>> at org.apache.wiki.WikiEngine.getPage(WikiEngine.java:1961)
>> at org.apache.wiki.WikiEngine.getPage(WikiEngine.java:1955)
>> at
>>
>> org.apache.wiki.search.SearchManager.actionPerformed(SearchManager.java:382)
>>
>> Is this because the page was never added to the SearchEngine to be indexed
>> ?
>> Or is there a double delete somewhere ?
>>
>> Harry
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message