You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jonathan Layes <j....@layes.com> on 2002/06/06 03:25:39 UTC

Re: Configuring DatabaseReader? (suggestion for documentation)

Perfect, thanks Gerhard!  "use-connection" is a child of reader, not
an attribute of reader as I incorrectly guessed. 

Pascal's email should be incorporated in the documentation - it makes
a fine mini-tutorial.  There really is a lot of useful database stuff
in that post.  Are any of the docs people listening?  :)  

Cheers, Jonathan

On Thu, Jun 06, 2002 at 01:41:13AM +0200, Gerhard Hipfinger wrote:
> Hi!
> 
> Look at
> 
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101468178609584&w=2
> 
> The DatabaseReader part works for me, when configured in the described 
> way. Only inserting doesn't work (see my posting some minutes ago).
> 
> Hope this helps,
> Gerhard
> 
> Jonathan Layes wrote:
> 
> >Hi all,
> >
> >I've been searching everywhere and I can't find an example on how 
> >to configure the DatabaseReader.  Digging through the sourcecode
> >and Javadocs, I managed to put something like this together:
> >
> >	<map:reader name="database"
> >      	    src="org.apache.cocoon.reading.DatabaseReader"
> >            use-connection="jonathan_pool"/>
> >	...
> >        <map:match pattern="gallery/image.jpg">
> >            <map:read type="database" src="1" mime-type="image/jpeg">
> >                <map:parameter name="table" value="image"/>
> >                <map:parameter name="resource" value="data"/>
> >                <map:parameter name="key" value="id"/>
> >            </map:read>
> >        </map:match>
> >
> >This doesn't work, however.  I get the following error:
> >
> >org.apache.cocoon.ProcessingException: Lookup of reader for role 'database' failed.: org.apache.avalon.framework.component.ComponentException: UnnamedSelector: ComponentSelector could not find the component for hint: database
> >
> >I know the "jonathan_pool" connection pool is working because my ESQL 
> >XSPs are working correctly.  
> >
> >Any suggestions?
> >
> >Thanks, Jonathan
> >
> >
> >---------------------------------------------------------------------
> >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>
> >
> >
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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>
> 

---------------------------------------------------------------------
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>