Hello,

I'm trying to learn OJB but am struggling getting a simple project to
run in Eclipse 2.1.3.  I found what appears to be a good tutorial
entitled...

        "Object-Relational Mapping with Apache Jakarta OJB" by Charles Chan
        (http://www.onjava.com/lpt/a/2946) dated: 01/08/2003

I've built the clases and the project compiles.  The error I cannot get
past is... 

        Property for key 'PersistenceBrokerFactoryClass' can not be found in
        properties file.

As an FYI, I've successfully built the OJB rc6 from source.  I can also
run the tuturial shell scripts in bin.

Here's how my Eclipse project is layed out...

./.classpath
./.project
./OJB.properties
./build.properties
./repository.dtd
./repository.xml
./repository_internal.xml
./repository_user.xml
./com/omni/doug/ojb/lib/ant.jar
./com/omni/doug/ojb/lib/antlr.debug.jar
./com/omni/doug/ojb/lib/antlr.jar
./com/omni/doug/ojb/lib/antlr_compiletime.jar
./com/omni/doug/ojb/lib/commons-beanutils.jar
./com/omni/doug/ojb/lib/commons-collections.jar
./com/omni/doug/ojb/lib/commons-dbcp-1.1.jar
./com/omni/doug/ojb/lib/commons-lang-2.0.jar
./com/omni/doug/ojb/lib/commons-logging.jar
./com/omni/doug/ojb/lib/commons-pool-1.1.jar
./com/omni/doug/ojb/lib/db-ojb-1.0.rc6.jar
./com/omni/doug/ojb/lib/hsqldb.jar
./com/omni/doug/ojb/lib/j2ee.jar
./com/omni/doug/ojb/lib/jakarta-regexp-1.3.jar
./com/omni/doug/ojb/lib/jcs.jar
./com/omni/doug/ojb/lib/jdo.jar
./com/omni/doug/ojb/lib/junit.jar
./com/omni/doug/ojb/lib/log4j-1.2.8.jar
./com/omni/doug/ojb/lib/mysql-connector-java-3.0.7-stable-bin.jar
./com/omni/doug/ojb/lib/optional.jar
./com/omni/doug/ojb/lib/p6spy.jar
./com/omni/doug/ojb/lib/prevayler.jar
./com/omni/doug/ojb/lib/torque-3.0.2.jar
./com/omni/doug/ojb/lib/velocity-1.3.1.jar
./com/omni/doug/ojb/lib/xalan.jar
./com/omni/doug/ojb/lib/xdoclet-1.2b3-dev.jar
./com/omni/doug/ojb/lib/xdoclet-ojb-module-1.2b3-dev.jar
./com/omni/doug/ojb/lib/xercesImpl.jar
./com/omni/doug/ojb/lib/xjavadoc-1.0.jar
./com/omni/doug/ojb/lib/xml-apis.jar
./com/omni/doug/ojb/onlamp/BasePersistenceObjectImpl.class
./com/omni/doug/ojb/onlamp/BasePersistenceObjectImpl.java
./com/omni/doug/ojb/onlamp/Employee.class
./com/omni/doug/ojb/onlamp/Employee.java
./com/omni/doug/ojb/onlamp/EmployeeImpl.class
./com/omni/doug/ojb/onlamp/EmployeeImpl.java
./com/omni/doug/ojb/onlamp/EmployeeTest.class
./com/omni/doug/ojb/onlamp/EmployeeTest.java
./com/omni/doug/ojb/onlamp/Manager.class
./com/omni/doug/ojb/onlamp/Manager.java
./com/omni/doug/ojb/onlamp/ManagerImpl.class
./com/omni/doug/ojb/onlamp/ManagerImpl.java
./com/omni/doug/ojb/onlamp/OJBPersistenceManager.class
./com/omni/doug/ojb/onlamp/OJBPersistenceManager.java
./com/omni/doug/ojb/onlamp/OJBTransaction.class
./com/omni/doug/ojb/onlamp/OJBTransaction.java
./com/omni/doug/ojb/onlamp/PersistenceManager.class
./com/omni/doug/ojb/onlamp/PersistenceManager.java
./com/omni/doug/ojb/onlamp/Transaction.class
./com/omni/doug/ojb/onlamp/Transaction.java

If it helps, here's the console output from a debug session... 
[BOOT] WARN: Value "ojb.broker.cache.ObjectCacheDefaultImpl" is illegal for key 
"ObjectCacheClass" (should be a class, using default value class 
org.apache.ojb.broker.cache.ObjectCacheDefaultImpl)
[BOOT] WARN: Value "ojb.broker.accesslayer.ConnectionFactoryDefaultImpl" is illegal 
for key "ConnectionFactoryClass" (should be a class, using default value class 
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl)
[BOOT] WARN: Value "ojb.odmg.locking.LockManagerDefaultImpl" is illegal for key 
"LockManagerClass" (should be a class, using default value class 
org.apache.ojb.odmg.locking.LockManagerDefaultImpl)
[BOOT] WARN: Value "ojb.odmg.locking.InMemoryLockMapImpl" is illegal for key 
"LockMapClass" (should be a class, using default value class 
org.apache.ojb.odmg.locking.InMemoryLockMapImpl)
[BOOT] WARN: Value "ojb.broker.util.logging.PoorMansLoggerImpl" is illegal for key 
"LoggerClass" (should be a class, using default value class 
org.apache.ojb.broker.util.logging.PoorMansLoggerImpl)
[BOOT] WARN: Value "ojb.broker.metadata.PersistentFieldPropertyImpl" is illegal for 
key "PersistentFieldClass" (should be a class, using default value class 
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl)
[BOOT] WARN: Value "ojb.broker.singlevm.PersistenceBrokerImpl" is illegal for key 
"PersistenceBrokerClass" (should be a class, using default value class 
org.apache.ojb.broker.core.PersistenceBrokerImpl)
[BOOT] WARN: Value "ojb.odmg.collections.DListImpl" is illegal for key 
"OqlCollectionClass" (should be a class, using default value class 
org.apache.ojb.odmg.collections.DListImpl)
[BOOT] WARN: Value "ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl" is illegal for 
key "PersistenceBrokerFactoryClass" (should be a class, using default value null)
[BOOT] ERROR: Creation of PersistenceBrokerFactory (PBF) instance failed, can't get 
PBF class object
Exception in thread "main" java.lang.ExceptionInInitializerError
        at 
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(PersistenceBrokerFactory.java:65)
        at 
com.omni.doug.ojb.onlamp.OJBPersistenceManager.<init>(OJBPersistenceManager.java:26)
        at 
com.omni.doug.ojb.onlamp.PersistenceManager.getInstance(PersistenceManager.java:22)
        at com.omni.doug.ojb.onlamp.EmployeeTest.testPersistence(EmployeeTest.java:48)
        at com.omni.doug.ojb.onlamp.EmployeeTest.main(EmployeeTest.java:38)
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(PersistenceBrokerFactoryFactory.java:58)
        at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(PersistenceBrokerFactoryFactory.java:36)
        ... 5 more
[BOOT] WARN: Value "ojb.broker.cache.ObjectCacheDefaultImpl" is illegal for key 
"ObjectCacheClass" (should be a class, using default value class 
org.apache.ojb.broker.cache.ObjectCacheDefaultImpl)
[BOOT] WARN: Value "ojb.broker.accesslayer.ConnectionFactoryDefaultImpl" is illegal 
for key "ConnectionFactoryClass" (should be a class, using default value class 
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl)
[BOOT] WARN: Value "ojb.odmg.locking.LockManagerDefaultImpl" is illegal for key 
"LockManagerClass" (should be a class, using default value class 
org.apache.ojb.odmg.locking.LockManagerDefaultImpl)
[BOOT] WARN: Value "ojb.odmg.locking.InMemoryLockMapImpl" is illegal for key 
"LockMapClass" (should be a class, using default value class 
org.apache.ojb.odmg.locking.InMemoryLockMapImpl)
[BOOT] WARN: Value "ojb.broker.util.logging.PoorMansLoggerImpl" is illegal for key 
"LoggerClass" (should be a class, using default value class 
org.apache.ojb.broker.util.logging.PoorMansLoggerImpl)
[BOOT] WARN: Value "ojb.broker.metadata.PersistentFieldPropertyImpl" is illegal for 
key "PersistentFieldClass" (should be a class, using default value class 
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl)
[BOOT] WARN: Value "ojb.broker.singlevm.PersistenceBrokerImpl" is illegal for key 
"PersistenceBrokerClass" (should be a class, using default value class 
org.apache.ojb.broker.core.PersistenceBrokerImpl)
[BOOT] WARN: Value "ojb.odmg.collections.DListImpl" is illegal for key 
"OqlCollectionClass" (should be a class, using default value class 
org.apache.ojb.odmg.collections.DListImpl)
[BOOT] WARN: Value "ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl" is illegal for 
key "PersistenceBrokerFactoryClass" (should be a class, using default value null)
[BOOT] ERROR: Creation of PersistenceBrokerFactory (PBF) instance failed, can't get 
PBF class object
Exception in thread "main" java.lang.ExceptionInInitializerError
        at 
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(PersistenceBrokerFactory.java:65)
        at 
com.omni.doug.ojb.onlamp.OJBPersistenceManager.<init>(OJBPersistenceManager.java:26)
        at 
com.omni.doug.ojb.onlamp.PersistenceManager.getInstance(PersistenceManager.java:22)
        at com.omni.doug.ojb.onlamp.EmployeeTest.testPersistence(EmployeeTest.java:48)
        at com.omni.doug.ojb.onlamp.EmployeeTest.main(EmployeeTest.java:38)
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(PersistenceBrokerFactoryFactory.java:58)
        at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(PersistenceBrokerFactoryFactory.java:36)
        ... 5 more
 from a debug session


-- 
Regards,
Doug

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

Reply via email to