You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tomek Piechowicz <to...@gmail.com> on 2009/06/27 18:53:51 UTC

Cocoon 2.2 + eXist native xml db 1.2.6

Hi.
I`m new to Cocoon and I want to use this framework with eXist xml db 
which is installed locally. In section 3. Cocoon Sitemap Configuration 
on eXist home page (http://demo.exist-db.org/exist/configuration.xml) I 
found some information about defining XML:DB driver as a pseudo-protocol 
in Cocoon`s configuration file :

In eXist, pseudo-protocols are configured in Cocoon's main configuration 
file WEB-INF/cocoon.xconf. To make use of these protocols, simply 
specify the correct database driver class, as in the following example:

<source-handler logger="core.source-handler">
      <protocol 
class="org.apache.cocoon.components.source.XMLDBSourceFactory"
      name="xmldb">
      <driver class="org.exist.xmldb.DatabaseImpl" type="exist"/>
      </protocol>
 </source-handler>

I don`t have cocoon.xconf in WEB-INF directory, so I don`t know where 
should I put this code. I read that there is no global cocoon.xconf in 
Cocoon 2.2 because each block has it`s own configuration file.

Could you give me some advice how to configure Cocoon to work with eXist ?

Regards,
Tomek

Ps: Sorry for poor english.







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon 2.2 + eXist native xml db 1.2.6

Posted by Tomek Piechowicz <to...@gmail.com>.
I went through archive in both Cocoon and eXist mailing lists and I found
some useful informations.

1. After I created new cocoon 2.2 block in maven I copied following jars to
WEB-INF/lib directory :

exist/exist.jar
exist/exist-optional.jar
exist/lib/core/antlr-2.7.6.jar
exist/lib/core/commons-pool-1.4.jar
exist/lib/core/xmldb.jar
exist/lib/core/xmlrpc-client-3.1.1.jar
exist/lib/core/xmlrpc-common.3.1.1.jar 


Tomek Piechowicz wrote:
> 
> In eXist, pseudo-protocols are configured in Cocoon's main configuration 
> file WEB-INF/cocoon.xconf. To make use of these protocols, simply 
> specify the correct database driver class, as in the following example:
> 
> <source-handler logger="core.source-handler">
>       <protocol 
> class="org.apache.cocoon.components.source.XMLDBSourceFactory"
>       name="xmldb">
>       <driver class="org.exist.xmldb.DatabaseImpl" type="exist"/>
>       </protocol>
>  </source-handler>
> 

2. I`ve created my own cocoon.xconf in META-INF/cocoon/avalon/ and I put
above code into it. After I run maven jetty 

server threw exception :

org.apache.avalon.framework.configuration.ConfigurationException: Unknow
document 'source-handler'

3. Then I tried another code which I`ve found somewhere in the archive :

<components>
	<source-factories>            
		<component-instance
class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory"
name="xmldb">
			<driver class="org.exist.xmldb.DatabaseImpl" type="exist"/>
		</component-instance>
	</source-factories>
</components>

but again server threw exception :

java.lang.ClassNotFoundException:
org.apache.cocoon.components.source.impl.XMLDBSourceFactory


Can anyone help me with configuring cocoon to use XQueryGenerator to access
eXist ?

Regards,
Tomasz

-- 
View this message in context: http://www.nabble.com/Cocoon-2.2-%2B-eXist-native-xml-db-1.2.6-tp24234708p24261291.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org