Hi Laurent,

sounds like a classpath issue.
Is the OJB.properties really in the classpath of your new project?

regards,
Armin

Laurent Sacaut wrote:
Hello all,

I am trying to get started with ojb 1.0.4 in a project that uses MySQL
5.0. I already have a test project that seems to be working and I am
trying to replicate the same working conditions in a new test project so
I can move on to the real thing.
The problem I am having I think is at the configuration level. I can get
a broker off the PersistenceBrokerFactory class for some reason and I
can't pinpont why.

The error I am getting for now is:

/java.lang.ExceptionInInitializerError
    at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
    at org.apache.ojb.tutorial1.Application.<init>(Unknown Source)
    at org.apache.ojb.tutorial1.Application.main(Unknown Source)
Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key
'PersistenceBrokerFactoryClass' can not be found in properties file
    at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
Source)
    at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
Source)
    ... 3 more


/In the OJB.property file I have in the  'PersistenceBrokerFactory /
PersistenceBroker section':/
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl

/So I am not sure what the message means exactly./


/The code I am using for this is:
/
private PersistenceBroker broker;

public Application()
    {
        broker = null;
        try
        {
            broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        }
        catch (Throwable t)
        {
            t.printStackTrace();
        }
//...

/It breaks in the try block with the error shown above.

Can anyone tell me why I would get such an error, files I need to have,
where.... I am using Eclipse as the developing environment. Not sure
where to look from there as I have been pounding on this for a few days
already.

thanks,
Laurent

---------------------------------------------------------------------
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