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/12 01:15:19 UTC

Tutorial & Xindice

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>


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>


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>