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 Martin Smith <ma...@goldenhill.co.uk> on 2003/08/26 23:45:08 UTC

newbie - can't find repository xml files

I have managed to get OJB working in a stand-alone app - but now I want to
get it working under Tomcat.

The error I am getting is:

Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not read
repository class descriptor data, using repository: repository.xml:
C:\WINDOWS\system32\repository.xml (The system cannot find the file
specified)

Why oh why is it looking there for my repository.xml???

I thought it only had to be on the class path to be found.  Mine is in my
WEB-INF dir.

My OJB.properties file is in the uk.co.smitek.'appname' level of my package
hierarchy.  Is that correct?

Should I be using

broker = PersistenceBrokerFactory.defaultPersistenceBroker();

or

PBKey pbKey = new PBKey("default");
broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);

to get a broker?

Please help!!!!!

Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: newbie - can't find repository xml files

Posted by LAURENT Stephane <bi...@sportmalin.com>.
A solution (other suggestions welcome !) :
set your absolute path to repository in a OJB.properties file (and put it on
/WEB-INF/lib or /WEB-INF/classes directory)

repositoryFile=C:/conf-dir/repository.xml

----- Original Message ----- 
From: "Martin Smith" <ma...@goldenhill.co.uk>
To: <oj...@db.apache.org>
Sent: Tuesday, August 26, 2003 11:45 PM
Subject: newbie - can't find repository xml files


>
> I have managed to get OJB working in a stand-alone app - but now I want to
> get it working under Tomcat.
>
> The error I am getting is:
>
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not
read
> repository class descriptor data, using repository: repository.xml:
> C:\WINDOWS\system32\repository.xml (The system cannot find the file
> specified)
>
> Why oh why is it looking there for my repository.xml???
>
> I thought it only had to be on the class path to be found.  Mine is in my
> WEB-INF dir.
>
> My OJB.properties file is in the uk.co.smitek.'appname' level of my
package
> hierarchy.  Is that correct?
>
> Should I be using
>
> broker = PersistenceBrokerFactory.defaultPersistenceBroker();
>
> or
>
> PBKey pbKey = new PBKey("default");
> broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);
>
> to get a broker?
>
> Please help!!!!!
>
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: newbie - can't find repository xml files

Posted by Brian McCallister <mc...@forthillcompany.com>.
I recommend putting the repository.xml and OJB.properties in 
WEB-INF/classes/

That puts it in the classpath for a servlet, no problems.

Weird that tomcat looks in windows directories.

-Brian

On Tuesday, August 26, 2003, at 05:45 PM, Martin Smith wrote:

>
> I have managed to get OJB working in a stand-alone app - but now I 
> want to
> get it working under Tomcat.
>
> The error I am getting is:
>
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not 
> read
> repository class descriptor data, using repository: repository.xml:
> C:\WINDOWS\system32\repository.xml (The system cannot find the file
> specified)
>
> Why oh why is it looking there for my repository.xml???
>
> I thought it only had to be on the class path to be found.  Mine is in 
> my
> WEB-INF dir.
>
> My OJB.properties file is in the uk.co.smitek.'appname' level of my 
> package
> hierarchy.  Is that correct?
>
> Should I be using
>
> broker = PersistenceBrokerFactory.defaultPersistenceBroker();
>
> or
>
> PBKey pbKey = new PBKey("default");
> broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);
>
> to get a broker?
>
> Please help!!!!!
>
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org