I see helpful little messages describing each issue and then my broker opens
anyway. I only experienced what you describe when I put my
broker = PersistenceBrokerFactory.createPersistenceBroker( new PBKey(
"repository.xml" ) );
call in a static initialiser. The problem went away when I moved the call to
separate static method and called it the first time the broker was accessed
(not on the class load):
private static void initialiseBroker(){
if( broker != null ) return;
logger.debug("Initialising broker");
try {
broker =
PersistenceBrokerFactory.createPersistenceBroker( new PBKey(
"repository.xml" ) );
} catch( PBFactoryException e ) {
logger.warn(e);
}
}
Gareth.
> -----Original Message-----
> From: David Corbin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 18 September 2002 9:18 a.m.
> To: ojb Users List
> Subject: On useful error messages
>
>
> I don't want to sound like a whiner, and I certainly appreciate
> everything everybody has done in making OJB what it is, but
> my largest
> peeve right now is that when something is "out of wack" with the
> repositoryl.xml-javaObjects-schema, you can one large unhelpful error
> message that repository.xml could not be opened. You get
> this if your
> XML is invalid. You get this if a table is missing. You get
> this if a
> property name is misspelled. Is anyone doing anything to improve the
> error message that happen "on load"?
>
> Thanks David
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>