You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by "Timothy M. Dean" <td...@visi.com> on 2002/01/10 20:14:06 UTC

openorb.home property?

I am trying to take some code that successfully accesses data via
Xindice in a standalone Java application, and make it work from within a
Java Servlet (using Tomcat 4 as my servlet engine). For some reason,
when I attempt to access a collection within my servlet code, I getn an
XMLDB exception. The exception message is:

   org.xmldb.api.base.XMLDBException: A connection to the Database
   instance 'db' could not be created. Error: Cannot create resource
   URL. Please set the openorb.home property.

Does anyone know what could cause this problem. Any idea why running
from within a servlet would make a difference? I've downloaded the
OpenORB source and been able to find that the error happends within the
ORB.init() method. Any suggestions would be appreciated.

- Tim


Re: openorb.home property?

Posted by Gianugo Rabellino <gi...@apache.org>.
Timothy M. Dean wrote:

> I'm currently working from a Windows distribution and am not sure how to
> get at the Tomcat ClassLoader HOWTO for more information on this issue.

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

Ciao,


RE: openorb.home property?

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Thomas Sempf [mailto:xindice@chaosmachine.de]
> 
> Hi,
> i am still trying to get the openorb thing right. So i copied the
> openorb jars in the common/lib directory. But i still get the same
error.
> 
> I try a xpath query like this, is it correct(?):
> 
> http://localhost:8080/cocoon/xmldb/bible//fl[contains(text(),'God')]

If you are using sitemap from Cocoon samples, then it is not correct.
Correct will be:
http://localhost:8080/cocoon/xmldb/db/xxx/bible?xpath=//fl[contains(text
(),'God')]

(replace 'xxx' with your collection name, e.g.: test)
if bible is one resource, and:
http://localhost:8080/cocoon/xmldb/db/bible/?xpath=//fl[contains(text(),
'God')]

if bible is a collection.


And, make sure that sitemap have following change:
     <map:generate src="xmldb:dbxml://localhost:4080/{../1}#{1}"/>

Note: Used '#' sign instead of '?' sign.


PS: Why do you need openorb? It does work without it for me...

Vadim


Re: openorb.home property?

Posted by Thomas Sempf <xi...@chaosmachine.de>.
Hi,
i am still trying to get the openorb thing right. So i copied the 
openorb jars in the common/lib directory. But i still get the same error.

I try a xpath query like this, is it correct(?):

http://localhost:8080/cocoon/xmldb/bible//fl[contains(text(),'God')]

I read something about adding this line:

System.setProperty("openorb.home","file:///opt/xindice/docs/");

But where to do this?
Here my error message:

Could not read resource 
xmldb:xindice://localhost:4080/bible/fl[contains(text(),'God')]

More precisly:

org.apache.cocoon.ProcessingException: Could not read resource 
xmldb:xindice://localhost:4080/bible/fl[contains(text(),'God')]: 
org.xmldb.api.base.XMLDBException: A connection to the Database instance 
'bible' could not be created. Error: Cannot create resource URL. Please 
set the openorb.home property.

I thankfull for any hints.

Greetings,
Thomas Sempf


RE: openorb.home property?

Posted by "Timothy M. Dean" <td...@visi.com>.
Thanks for the tip - That fixed me up!

I'm currently working from a Windows distribution and am not sure how to
get at the Tomcat ClassLoader HOWTO for more information on this issue.
Is there anywhere else I could get info (or would someone like to email
me this HOWTO so I can read it myself?)

- Tim


> -----Original Message-----
> From: Gianugo Rabellino [mailto:gianugo@apache.org] 
> Sent: Thursday, January 10, 2002 2:13 PM
> To: xindice-users@xml.apache.org
> Subject: Re: openorb.home property?
> 
> 
> Timothy M. Dean wrote:
> 
> 
>  >    org.xmldb.api.base.XMLDBException: A connection to the Database
>  >    instance 'db' could not be created. Error: Cannot 
> create resource
>  >    URL. Please set the openorb.home property.
> 
> 
> Quick and dirty: put the openorb jars in 
> $CATALINA_HOME/common/lib. They need to be accessible from 
> the classloader (look at Tomcat ClassLoader HOWTO for the 
> exact reason).
> 
> Ciao,
> 
> 


Re: openorb.home property?

Posted by Gianugo Rabellino <gi...@apache.org>.
Timothy M. Dean wrote:


 >    org.xmldb.api.base.XMLDBException: A connection to the Database
 >    instance 'db' could not be created. Error: Cannot create resource
 >    URL. Please set the openorb.home property.


Quick and dirty: put the openorb jars in $CATALINA_HOME/common/lib. They
need to be accessible from the classloader (look at Tomcat ClassLoader
HOWTO for the exact reason).

Ciao,


Re: openorb.home property?

Posted by Jeff Suttor <Je...@Sun.COM>.
this does not happen with newer builds.

if you want to "fix" your current environment:

System.setProperty("openorb.home","file:///opt/xindice/docs/");

this will then use the HTTP server in Xindice to look for this URL and a
subdirectory called "config" where the config file should be located. 
the URL is the "docroot" of the HTTP serer.

--
Jeff.Suttor@Sun.com



"Timothy M. Dean" wrote:
> 
> I am trying to take some code that successfully accesses data via
> Xindice in a standalone Java application, and make it work from within a
> Java Servlet (using Tomcat 4 as my servlet engine). For some reason,
> when I attempt to access a collection within my servlet code, I getn an
> XMLDB exception. The exception message is:
> 
>    org.xmldb.api.base.XMLDBException: A connection to the Database
>    instance 'db' could not be created. Error: Cannot create resource
>    URL. Please set the openorb.home property.
> 
> Does anyone know what could cause this problem. Any idea why running
> from within a servlet would make a difference? I've downloaded the
> OpenORB source and been able to find that the error happends within the
> ORB.init() method. Any suggestions would be appreciated.
> 
> - Tim

--
Jeff.Suttor@Sun.com