You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by F Baube <fb...@welho.com> on 2002/06/07 16:54:20 UTC
About ComponentExceptions and Hints
(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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Tutorial & Xindice
Posted by Alex McLintock <al...@OWAL.co.uk>.
At 00:15 12/06/02, F Baube wrote:
>Cocoon 2.0.2, Xindice 1.0, Tomcat 4.0.4-b3 on Linux...
>
>I'm trying to work thru the Cocoon tutorial,
>and I'd like to get it to work with Xindice.
>And I'm afraid that DB's are not my strong point.
>
>I have Xindice running, and I get an exception (below)
>when I try to add a department (which takes me to the URL
>
> http://localhost:8080/cocoon/tutorial/create-dept.html
>
>How could I get the tutorial to work with Xindice ?
You seem to be a bit confused about the difference between a relational
database and an XML database. A relational database has tables, rows, is
searched using SQL and sometimes has a JDBC driver. XIndice has none of
these things and so will not work with JDBC. It stores XML documents
(grouped into collections), you search it with XPath and the things
returned are XML fragments.
Do not try to use XIndice as a relational database.
Alex
Openweb Analysts Ltd, London: Software For Complex Websites
http://www.OWAL.co.uk/
Free Consultancy for London Companies thinking of Open Source Software.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Tutorial & Xindice
Posted by F Baube <fb...@welho.com>.
Hello,
and thank you for your reply !
I have a question about unique OID's
(and ID's and IDREF's) ...
Thusly spake Vadim Gritsenko:
>
> > From: F Baube [mailto:fbaube@welho.com]
> >
> > Cocoon 2.0.2, Xindice 1.0, Tomcat 4.0.4-b3 on Linux...
> >
> > I'm trying to work thru the Cocoon tutorial,
> > and I'd like to get it to work with Xindice.
> To work with xindice, you can use XML:DB source
> (see sample sitemap) and XML:DB transformer
> (in the scratchpad).
when you say "sample sitemap" I guess you mean
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
http://localhost:8080/cocoon/documents/userdocs/concepts/sitemap.html
about the XML:DB transformer
"org.apache.cocoon.transformation.XMLDBTransformer"
I see that it takes an OID argument, which it adds into the
DB as an "OID" attribute.
do you have code to create unique ID's ?
obviously this OID should be unique within the collection.
but if it is also unique _across_ collections, then it can
be used as the value of an IDREF.
to do this, each ID should be a combination of the collection
name plus a string that is unique _within_ the collection.
this could be a timestamp; to guarantee uniqueness, normally
one-second resolution would be enough. but this means there
should still be some sort of centralized ID allocator. in
the Cocoon architecture, is it possible to make a Singleton
which is accessible from _all_ Generators and Transformers ?
> Vadim
thanks again,
fred
--
F. Baube * "We have free speech but everyone is
fbaube @ * afraid to use it." -- Jimmy Breslin
welho.com *
+358 41 536 8192
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Tutorial & Xindice
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: F Baube [mailto:fbaube@welho.com]
>
> Cocoon 2.0.2, Xindice 1.0, Tomcat 4.0.4-b3 on Linux...
>
> I'm trying to work thru the Cocoon tutorial,
> and I'd like to get it to work with Xindice.
> And I'm afraid that DB's are not my strong point.
>
> I have Xindice running, and I get an exception (below)
> when I try to add a department (which takes me to the URL
>
> http://localhost:8080/cocoon/tutorial/create-dept.html
>
> How could I get the tutorial to work with Xindice ?
>
> I see that SQL tables are created and filled with sample
> data in src/webapp/docs/samples/sql/sql-page.xml.sql .
>
> If I create similar documents in Xindice, what
> else would be required to make the tutorial run ?
>
> Or ... does use of the ESQL logicsheet require
> a JDBC driver that Xindice simply does not have ?
> Do I have to use a relational database instead ?
ESQL is a logicsheet to work with SQL (relational) databases. Java
connects to SQL databases using JDBC.
Xindice neither relational database nor has JDBC interface (because,
again, it is not relational database).
To work with xindice, you can use XML:DB source (see sample sitemap) and
XML:DB transformer (in the scratchpad).
Vadim
...
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Tutorial & Xindice
Posted by F Baube <fb...@welho.com>.
Cocoon 2.0.2, Xindice 1.0, Tomcat 4.0.4-b3 on Linux...
I'm trying to work thru the Cocoon tutorial,
and I'd like to get it to work with Xindice.
And I'm afraid that DB's are not my strong point.
I have Xindice running, and I get an exception (below)
when I try to add a department (which takes me to the URL
http://localhost:8080/cocoon/tutorial/create-dept.html
How could I get the tutorial to work with Xindice ?
I see that SQL tables are created and filled with sample
data in src/webapp/docs/samples/sql/sql-page.xml.sql .
If I create similar documents in Xindice, what
else would be required to make the tutorial run ?
Or ... does use of the ESQL logicsheet require
a JDBC driver that Xindice simply does not have ?
Do I have to use a relational database instead ?
The exception:
Message
Could not add record
Source
org.apache.cocoon.ProcessingException
Description
org.apache.cocoon.ProcessingException: Could not add record: org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid JdbcConnection class available
Stack Traces
Original exception : org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid JdbcConnection class available
at org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(JdbcConnectionFactory.java:183)
at org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLimitingPool.java:491)
at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.newPoolable(ValidatedResourceLimitingPool.java:140)
at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.newPoolable(ResourceLimitingJdbcConnectionPool.java:81)
at org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPool.java:314)
at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:91)
at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:131)
at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:107)
at org.apache.cocoon.www.tutorial.sitemap_xmap.action_set_process(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:437)
at org.apache.cocoon.www.tutorial.sitemap_xmap.matchN400084(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:903)
at org.apache.cocoon.www.tutorial.sitemap_xmap.process(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:745)
at org.apache.cocoon.www.tutorial.sitemap_xmap.process(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:684)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.www.sitemap_xmap.matchN4002F9(/usr/local/FWD/jakarta-tomcat-4.0.4-b3/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:3538)
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:2685)
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:2583)
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)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
[..]
thanks
--
Fred Baube
fbaube @ welho.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>