great! now, after some endless hours of (mis)configuration  OJB is set up.
... at least for PersistenceBroker. thanks!

-----Ursprüngliche Nachricht-----
Von: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 23. Dezember 2003 20:37
An: OJB Users List
Betreff: RE: Re: InitializerError + OJBRuntimeException

Of course, this is OJB :)

OJB.properties location & name can be specified through a call to
System.setProperty("OJB.properties", <path>) before anything is done.
In the OJB.properties file you can specify the location and name of the
repository.xml file.

Have fun,
Rob :)


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, 24 December 2003 7:07 a.m.
To: [EMAIL PROTECTED]
Subject: Aw: Re: InitializerError + OJBRuntimeException


Hi Armin,

thanks for your hint. OJB.properties has not been on the classpath
indeed. Now it works. However, I do not feel very comfortable with so
many property files (ojb, repository.xml ...) on the classpath. Is there
another way, so I can store these files where ever I want in my web
application and reference them?

greets,
Dirk


----- Original Nachricht ----
Von:     Armin Waibel <[EMAIL PROTECTED]>
An:      OJB Users List <[EMAIL PROTECTED]>
Datum:   23.12.2003 09:51
Betreff: Re: InitializerError + OJBRuntimeException

> Hi Dirk,
> 
>  > I am wondering about the OJBRuntimeExeception: what kind of 
> property
> key is
>  > missed?
> 
>  > 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(Unknow
> nSourc
> 
> 
> Seems OJB can't find OJB.properties file. Make sure that you include 
> all
> configuration files in classpath.
> 
> regards,
> Armin
> 
> Dirk Manske (mobil) wrote:
> > Hi,
> >  
> > I am new to OJB and get stuck with the following exception message:
> >  
> > java.lang.ExceptionInInitializerError
> >  at
> >
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroke
> r(Unkn
> 
> > own Source)
> >  at
> >
> de.premiere.plato.app.dao.ojb.OJBPBPersistenceManager.storeObject(OJBP
> BPersi
> 
> > stenceManager.java:159)
> >  at
> >
> de.premiere.plato.test.activity.control.TestDatabase.testStoreObject(T
> estDat
> 
> > abase.java:56)
> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:39
> 
> > )
> >  at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl
> 
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at junit.framework.TestCase.runTest(TestCase.java:154)
> >  at junit.framework.TestCase.runBare(TestCase.java:127)
> >  at junit.framework.TestResult$1.protect(TestResult.java:106)
> >  at junit.framework.TestResult.runProtected(TestResult.java:124)
> >  at junit.framework.TestResult.run(TestResult.java:109)
> >  at junit.framework.TestCase.run(TestCase.java:118)
> >  at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >  at junit.framework.TestSuite.run(TestSuite.java:203)
> >  at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote
> TestRu
> 
> > nner.java:392)
> >  at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR
> unner.
> 
> > java:276)
> >  at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest
> Runner
> 
> > .java:167)
> > 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(Unknow
> n
> > Source)
> >  at
> >
> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Un
> known
> > Source)
> >  ... 18 more
> >  
> >  
> > it happens after executing this method:
> > 
> > public void storeObject(Object object) throws 
> > PersistenceServiceException
> {
> >     try{
> >             broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
> > 
> >             broker.store(object);
> >     }
> >     catch(Exception e){
> >             //TODO Catch Klausel kommentieren
> >             throw new PersistenceServiceException("storeObject
failed");
> > 
> >     }
> >     finally{
> >             broker.close();
> >     }
> > }
> > 
> > I am wondering about the OJBRuntimeExeception: what kind of property

> > key
> is
> > missed?
> > 
> > thx,
> > Dirk
> >  
> > 
> > 
> > --------------------------------------------------------------------
> > -
> > 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]


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