Hi

Has anybody come across this problem with cinclude. I am running Cocoon
successfully on the following system

Mac OS X 10.2.3 with JDK 1.3
Tomcat 4.1.18
Cocoon 2.0.4

But ... I have a sitemap entry of

<map:pipeline>
<map:match pattern="nb*.xml">
<map:generate src="content/nb{1}.xml"/>
<map:transform type="cinclude"/>
<map:transform src="transforms/notebooks-html.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>

and I am getting the following when accessing the file nb2003.xml (which has no include statements yet)

ERROR (2003-02-07) 10:23.11:723 [sitemap] (/notebooks/nb2003.xml) Thread-25/sitemap_xmap: Sitemap
org.apache.cocoon.ProcessingException: Could not read resource file:/Library/Tomcat/jakarta-tomcat-4.1.18/webapps/notebooks/content/nb2003.xml: java.lang.NullPointerException
at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:156)
at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)
at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395)
at org.apache.cocoon.www.sitemap_xmap.matchN1007C(/Library/Tomcat/jakarta-tomcat-4.1.18/work/Standalone/localhost/notebooks/cocoon-files/org/ apache/cocoon/www/sitemap_xmap.java:965)
at org.apache.cocoon.www.sitemap_xmap.process(/Library/Tomcat/jakarta-tomcat-4.1.18/work/Standalone/localhost/notebooks/cocoon-files/org/apache/ cocoon/www/sitemap_xmap.java:581)
at org.apache.cocoon.www.sitemap_xmap.process(/Library/Tomcat/jakarta-tomcat-4.1.18/work/Standalone/localhost/notebooks/cocoon-files/org/apache/ cocoon/www/sitemap_xmap.java:427)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)

This is all the clue that the log files give. If I remove the line

<map:transform type="cinclude"/>

then all is well again. I have tried this is several places including a vanilla Cocoon install and I still
get the same problem. It seems to work for the main Cocoon sitemap

<map:match pattern="news/aggregate">
<map:generate type="serverpages" src="docs/samples/xsp/aggregate.xsp"/>
<map:transform type="cinclude"/>
<map:transform src="stylesheets/news/news.xsl"/>
<map:serialize/>
</map:match>

Anybody got any ideas here? I am clearly missing something vital and I have searched around
without much success so any thoughts would be gratefully received. (I think that XInclude is the
same as well, but I have not exhaustively checked this.)

TIA

Hugh F-R

Hugh S. Field-Richards
QinetiQ, St Andrew's Road, Malvern, Worcs, WR14 3PS, UK
Tel: ++1684 895075 Fax: ++1684 896113
Email: [EMAIL PROTECTED]

Reply via email to