(disclaimer: I'm new to the list)
Configuration: Cocoon 2.0.2, JDK 1.3, Tomcat 4.0.4-b3, RH 7.2 Linux
There's a common sitemap-related error that many people have posted to
cocoon-users and cocoon-dev, but I still haven't seen a conclusive answer
to the cause of the problem.
The exception generally reads,
org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector could not find the
component for hint foobar"
Searching for " ComponentException hint " turns up 90 hits on cocoon-users
and 96 on cocoon-dev.
This happens to me too when I try to define and use a new Generator type.
<map:generator name="blog"
src="org.apache.cocoon.generation.BlogGenerator" label="content">
</map:generator>
[ .. ]
<map:match pattern="hello.blg">
<map:generate type="blog" src="docs/samples/hello-page.xml"/>
<map:transform src="stylesheets/page/simple-page2html.xsl"/>
<map:serialize/>
</map:match>
Naturally, between runs I clear out the Tomcat directories "work",
"logs", and "webapps/cocoon".
When I click on my link to "hello.blg", the exception that I get in my browser is:
An error occurred
The org.apache.cocoon.www.sitemap_xmap notifies that
org.apache.avalon.framework.component.ComponentException says:
UnnamedSelector: ComponentSelector could not find the component for hint: bog
More precisely:
org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector could not find the component for hint: blog
extra info stacktrace
org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector could not find the component for hint: blog
at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:276)
at
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:101)
at
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:104)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setGenerator(AbstractEventPipeline.java:138)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setGenerator(CachingEventPipeline.java:118)
at
org.apache.cocoon.www.sitemap_xmap.matchN400458(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:5370)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2974)
at
org.apache.cocoon.www.sitemap_xmap.process(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2621)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
[..]
I have checked, and my class BlogGenerator does get included into
the cocoon.war file, in webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar
I don't know if this is relevant, but some debugging code that I added to
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.java told me that
my new Generator with hint "blog" was being registered with addComponent()
but not with addSiteMapCmoponent().
I've seen at least four calls for assistance about this exception, maybe six,
in the couple of weeks I've been following the lists.
Perhaps something is missing from the documents' discussion of the sitemap ?
I've read over the discussions of how a pipeline is selected and processed,
but I can't seem to find the answer.
The problem (and my error) must be something embarrassingly simple.
thanks
fred baube
fbaube at welho.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>