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 Christine Gerstenmayer <ch...@chello.at> on 2005/06/30 20:38:03 UTC

Problem with OJB 1.0.1 in a batch-program

Hi all,

 

I use OJB in a batch-program. 

The batch-program is in a different project to the OBJ-Classes and
-properties.

All OJB-classes and -repository-files are included in a jar-File which is in
the classpath of the batch-program when running it.

 

When running it as a Java-Application in Eclipse with the OJB-Project in
Java Build Path everything works fine.

 

If I run it outside Eclipse in a shellskript I get the following exception
while initializing OJB:

 

2005-06-30 20:18:37,714 [ERROR] at.rit.cpm.azvimport.AZVImport  - There was
no default-PBKey specified

org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
specified

        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersisten
ceBroker(Unknown Source)

        at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn
own Source)

        at
at.rit.cpm.persistency.AbstractPersistency.getNewBroker(AbstractPersistency.
java:45)

        at
at.rit.cpm.persistency.AbstractPersistency.selectOrderedByCriteria(AbstractP
ersistency.java:428)

        at
at.rit.cpm.factory.BankTypeFactory.getAllBankTypes(BankTypeFactory.java:48)

        at at.rit.cpm.azvimport.AZVImport.main(AZVImport.java:33)

 

 

If I include the contents of repository.database.xml and
repository_internal.xml into repository_base.xml at place "&database" and
"&internal" and I copy all contents of all table-repository-files into
repository.xml (at "&adminlog;&banktype;..") it also works fine.

 

Why OJB doesn't find the files represented by the placeholders like
"&internal" or "&database" or "&<tablename>" when I run it in batch-mode ?

 

Please help.

 

Thanks in advance.

 

Christine