cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luigi Bai <lpb+coc...@focalpoint.com>
Subject Re: Accessign eXist via XMLDB problem
Date Thu, 08 Jul 2004 20:54:55 GMT
Nick,

You can either copy the xmldb-api-***.jar file from cocoon-2.1.4 into 
cocoon-2.1.5, or download the eXist source and fix 
org.exist.xmldb.DatabaseImpl to include the following method:

public String[] getNames() {
	return new String[] { dbName };
}

I've done both.

You can access an xmldb resource through eXist either through the file 
generator or through the XQueryGenerator. For a file, you can just use

<map:generate src="xmldb:exist://host:port/db/col1/col2/col3/res.xml" />

For XQuery, see http://exist.sf.net/devguide.html.

Nick wrote:

> Hi everybody,
> 
> I am trying to employ eXist via XML:DB. One of the requirements is to 
> have eXist as a separate web application, so the option of integrating 
> it into Cocoon is unavailable. As far as I understood it from available 
> documentation for XMLDBTransformer and eXist, eXist driver has to be 
> configured within cocoon.xconf for the XML:DB protocol.
> 
> I configure it as follows:
> 
> <><component-instance 
> class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory" 
> name="xmldb">
>    <driver class="org.exist.xmldb.DatabaseImpl" type="exist"/>
> </component-instance>
> Then I copy the following eXist libraries to the WEB-INF/libs directory:
> 
> Catalina-util.jar
> 
> Exist.jar
> 
> Exist-optional.jar
> 
> Libreadline-java.jar
> 
> Xmldbc.jar
> 
> <>Xmlrpc-1.2.jar
> This supposedly gets all the classes required. <>
> However, when I try to access http://localhost:8080/cocoon-2.1.5/, I 
> receive an error message:
> 
>  HTTP Status 500 -
> 
> ------------------------------------------------------------------------
> 
> *type* Exception report
> 
> *message*
> 
> *description* _The server encountered an internal error () that 
> prevented it from fulfilling this request._
> 
> *exception*
> 
> javax.servlet.ServletException: Servlet.init() for servlet Cocoon threw 
> exception
> 
>        
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) 
> 
> 
>        
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
> 
> ...
> 
>        java.lang.Thread.run(Unknown Source)
> 
> *root cause*
> 
> java.lang.AbstractMethodError: 
> org.exist.xmldb.DatabaseImpl.getNames()[Ljava/lang/String;
> 
>        org.xmldb.api.DatabaseManager.registerDatabase(Unknown Source)
> 
>        
> org.apache.cocoon.components.source.impl.XMLDBSourceFactory.configure(XMLDBSourceFactory.java:96)

> 
> 
>        
> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:240)

> 
> 
> ...            
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688) 
> 
> 
> <>
> 
>        java.lang.Thread.run(Unknown Source)
> 
> This is caused by the incompatibility of cocoon 2.1.5 libraries  (2.1.4 
> works just fine).
> 
> <>Is there anybody who have already solved this problem and succeeded in 
> accessing eXist through xmldb? If possible, can you also explain how to 
> specify URI of the eXist database with xmldb?
> 
> Thank you very much in advance.
> 
> <>Sincerely,
> Nick.
> 


-- 
<A HREF="http://www.focalpoint.com/">Home Page</A>
education is what's left after what is learned is forgotten.
                                -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
lpb@focalpoint.com             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                                (713) 215-1600 x 33#



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


Mime
View raw message