Hey all --



I'm seeing a problem with a SitemapSource where the first input stream returned by it is correct, but after calling refresh() and getting the input stream again, the stream contains a "resource not found" exception page. Example:

Source source = resolver.resolveURI("cocoon://some/pipeline");
InputStreamReader reader = new InputStreamReader(source.getInputStream(), "UTF-8");


// here the input stream contains the proper contents

source.refresh();
reader = new InputStreamReader(source.getInputStream(), "UTF-8");

// here the input stream has the resource not found page

I noticed this problem when using the MailSender component and sending the sitemap uri as the body source. By setting breakpoints, I saw that the getInputStream() method of the SitemapSource was called twice to send a single message (not sure why) and the second time it was called the contents of the stream contains the resource not found exception page.

This is cocoon 2.1.5. As a workaround, I am manually retrieving the output of the source myself (to avoid the two call problem) and this is working fine.

cheers,
-steve

Reply via email to