You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by ms...@vasoftware.com on 2003/06/20 12:00:12 UTC

Problems with OJB in a servlet container

Hi,

I'm new to the world of JDO and OJB, so please bear with me if this is
stupid/straightforward.

I want to use OJB in a servlet container. I wrote a small (standalone) test
application to do all the configuration and such. That one works.

I now tried to move everything into a servlet WAR:

- the OJB.properties and repository*.xml files in WEB-INF/classes
- all libraries in WEB-INF/lib
- the code from the standalone app (just creating and retrieving an object) into
a java bean that I call from a servlet

But I get a

java.lang.ExceptionInInitializerError
    at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(Unknown
Source)
    at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(Unknown
Source)
    ...

Is there anything obvious that I'm missing (should any libraries or config files
be in the servlet containers lib dir)? What is the best way to debug this?

Thanks
    MarkS

P.S: I'm using Resin.

Re: Problems with OJB in a servlet container

Posted by Alexander Prozor <ap...@isd.dp.ua>.
Maybe you use xalan lib different from OJB original version?
it can't parse URL to repository.xml file.
OJB don't put XMLreader.parse method in try/catch block so you will
not be able to see real situation in the log files :(.
-- 
Best regards,
 Alexander                            mailto:apro@isd.dp.ua