Thanks for all your help guys!

I eventually fixed it with a combination of a couple of you suggestions.

Firstly I added repositoryFile=C:/conf-dir/repository.xml to my
OJB.properties file.

Then I moved the OJB.properties file to the WEB-INF/classes dir instead of
WEB_INF/classes/my.domain.package

I don't like having to specify the exact location to my xml files, but I can
live with it for now.

Once again, many thanks.

Martin


-----Original Message-----
From: Martin Smith [mailto:[EMAIL PROTECTED]
Sent: 27 August 2003 12:04
To: OJB Users List
Subject: RE: newbie - can't find repository xml files


My Tomcat dir was as you suggested in Program Files.  I moved it to
c:\tomcat.

Now, then after I moved the tomcat dir I had to start the service through
the start menu, as the service would try and start tomcat from where I
installed it.

I now get the error:
Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not read
repository class descriptor data, using repository: repository.xml:
C:\Tomcat\bin\repository.xml (The system cannot find the file specified)

If I start the original installation through the start menu rather then the
service I get the error:

Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not read
repository class descriptor data, using repository: repository.xml:
C:\Program Files\Apache Group\Tomcat 4.1\repository.xml (The system cannot
find the file specified)

So it looks like it tries to find the XML files in different locations,
depending on how tomcat was launched!

-----Original Message-----
From: Charles Anthony [mailto:[EMAIL PROTECTED]
Sent: 27 August 2003 07:15
To: 'OJB Users List'
Subject: RE: newbie - can't find repository xml files


Hi,

Is Tomcat installed in a directory with spaces in ? e.g. "C:\Program
Files\Tomcat"

If so, it is possible that the XML parser is throwing a hissy fit (Xerces
has a problem with reading XML in a directory with spaces in). I would guess
that it is trying the applications "current" directory - which seems to be
C:\WINDOWS\system32\.

Cheers,

Charles

>-----Original Message-----
>From: Martin Smith [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, August 26, 2003 10:45 PM
>To: [EMAIL PROTECTED]
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


This email and any attachments are strictly confidential and are intended
solely for the addressee. If you are not the intended recipient you must
not disclose, forward, copy or take any action in reliance on this message
or its attachments. If you have received this email in error please notify
the sender as soon as possible and delete it from your computer systems.
Any views or opinions presented are solely those of the author and do not
necessarily reflect those of HPD Software Limited or its affiliates.

 At present the integrity of email across the internet cannot be guaranteed
and messages sent via this medium are potentially at risk.  All liability
is excluded to the extent permitted by law for any claims arising as a re-
sult of the use of this medium to transmit information by or to
HPD Software Limited or its affiliates.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to