To be precise:
I considered it to be a flaw in hippo-eventcache-1.01.02.jar that you
should first do a containsKey and then a get on the cache, because
otherwise you got a null pointer: instead of working around this for the
treeGenerator, I chose to change the hippo-eventcache
eventawaretransientstore to work like the other caches in cocoon.
So, it was never really a bug, just the treeGenerator depends on a newer
version of the event cache.
Another detail: the tree generator does not do any dasls, but only
propfinds
-Ard
>
> The NPE is caused by a bug in hippo-eventcache-1.01.02.jar;
> the 1.01.03 version fixes it.
> Thanks Ard for the advise.
>
> Jasha Joachimsthal wrote:
> > Mau,
> >
> > you're using {repository:files} in startpath. This should be
> > {repository:rootPath}{repository:filesPath}.
> >
> > Jasha
> >
> >
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On Behalf Of
> >> maurizio pillitu
> >> Sent: dinsdag 4 maart 2008 16:27
> >> To: hippocms-dev
> >> Subject: [HippoCMS-dev] NPE using TreeGenerator
> >>
> >> Hi everybody,
> >> I have a problem with the TreeGenerator - a Cocoon Generator
> >> contained into the hippo-cocoon-extensions - which performs a DASL
> >> query and render the results maintaining the hierarchical
> structure
> >> of the repository; it's very handy to render Website sitemaps.
> >> The problem is that when I use it I get a NPE:
> >>
> >> Caused by: java.lang.NullPointerException
> >> at
> >> org.apache.cocoon.components.store.impl.EventAwareTransientSto
> >> re.get(EventAwareTransientStore.java:143)
> >> at
> >> nl.hippo.cocoon.generation.repository.navigation.RepositoryNod
> >> e.fetchChildNodes(RepositoryNode.java:77)
> >> at
> >> nl.hippo.cocoon.generation.repository.navigation.RepositoryNod
> >> e.<init>(RepositoryNode.java:47)
> >> at
> >> nl.hippo.cocoon.generation.repository.navigation.TreeGenerator
> >> .generate(TreeGenerator.java:89)
> >> at
> >> org.apache.cocoon.components.pipeline.impl.ExpiresCachingProce
> >> ssingPipeline.processXMLPipeline(ExpiresCachingProcessingPipel
> >> ine.java:138)
> >> ... 41 more
> >>
> >> Hereby is the configuration I use in my sitemap:
> >>
> >> <map:generator label="content" logger="sitemap.generator.file"
> >> name="tree" pool-grow="4" pool-max="32" pool-min="4"
> >>
> src="nl.hippo.cocoon.generation.repository.navigation.TreeGenerator">
> >> <!--<exclude-documents>false</exclude-documents>-->
> >> <properties default-namespace="http://hippo.nl/cms/1.0"
> >> display="element">
> >> <prop><name>caption</name></prop>
> >> <prop><name>index</name></prop>
> >> <prop><name>type</name></prop>
> >>
> <prop><name>displayname</name><namespace>DAV:</namespace></prop>
> >> </properties>
> >> <orderby>index</orderby>
> >> </map:generator>
> >>
> >> <map:generate type="tree" >
> >> <map:parameter name="startpath" value="{repository:files}"/>
> >> <map:parameter name="path" value="content/nl/producten"/>
> >> <map:parameter name="depth" value="2"/>
> >> </map:generate>
> >>
> >> Any ideas?
> >> TIA
> >>
> >> Met vriendelijke groet,
> >> --
> >> Maurizio Pillitu - 0031 (0)615655668
> >> Sourcesense - making sense of Open Source:
> http://www.sourcesense.com
> >>
> >> ********************************************
> >> Hippocms-dev: Hippo CMS development public mailinglist
> >>
> >>
> > ********************************************
> > Hippocms-dev: Hippo CMS development public mailinglist
> >
>
>
> Met vriendelijke groet,
> --
> Maurizio Pillitu - 0031 (0)615655668
> Sourcesense - making sense of Open Source: http://www.sourcesense.com
>
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
********************************************
Hippocms-dev: Hippo CMS development public mailinglist