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 "Dirk Manske (mobil)" <di...@arcor.de> on 2003/12/23 01:21:00 UTC
InitializerError + OJBRuntimeException
Hi,
I am new to OJB and get stuck with the following exception message:
java.lang.ExceptionInInitializerError
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn
own Source)
at
de.premiere.plato.app.dao.ojb.OJBPBPersistenceManager.storeObject(OJBPBPersi
stenceManager.java:159)
at
de.premiere.plato.test.activity.control.TestDatabase.testStoreObject(TestDat
abase.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.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(RemoteTestRu
nner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.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(Unknown
Source)
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: InitializerError + OJBRuntimeException
Posted by Armin Waibel <ar...@code-au-lait.de>.
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(UnknownSourc
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.defaultPersistenceBroker(Unkn
> own Source)
> at
> de.premiere.plato.app.dao.ojb.OJBPBPersistenceManager.storeObject(OJBPBPersi
> stenceManager.java:159)
> at
> de.premiere.plato.test.activity.control.TestDatabase.testStoreObject(TestDat
> abase.java:56)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .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(RemoteTestRu
> nner.java:392)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
> java:276)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
> .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(Unknown
> Source)
> at
> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
> 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: 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