It was due to a wrong version of the repository_internal.xml (I took it from the Struts contrib example). This file had 2 definitions of the SequenceManagerTable ... hard for me to deduce that from the exception trace.
Thanks for the answer and sorry for the post. Laurent. -----Original Message----- From: Thomas Mahler [mailto:thma@;apache.org] Sent: dimanche 27 octobre 2002 22:24 To: OJB Users List Subject: Re: Newbie: getting started with Ojb Sounds like a problem with OJB.properties. You are either - using an old version of this file - or you did not place it in the classpath (should reside in the same place as repository.xml) cheers, Thomas Laurent Vanzeune wrote: > I have a sample DB (hypersonic) and I try to make Ojb work. > > - The database settings seem to be ok (I am able to connect using simple > JDBC). > - My config files are in the classpath (repository_user.xml > repository_internal.xml repository.xml OJB.properties repository.dtd) > - Tables for OJB where created using the OJB build scipt. > > When I open my DB(db.open( "repository.xml", Database.OPEN_READ_WRITE > );), I get the following exception: > "[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] INFO: > Already created persistence broker instances: 0 > [ConfigurableFactory] INFO: ConfigurableFactory called to serve a null > instance > [org.apache.ojb.odmg.DatabaseImpl] ERROR: Open database failed > Borrow broker from pool failed: Creation of a new PB instance > java.lang.reflect.InvocationTargetException: java.lang.NullPointerException > at > org.apache.ojb.broker.util.factory.ConfigurableFactory.createNewInstance(Unk nown > Source) > at > org.apache.ojb.broker.accesslayer.sql.SqlGeneratorFactory.createSqlGenerator (Unknown > Source) > at > org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.<init>(Unknown Source) > at java.lang.reflect.Constructor.newInstance(Native Method) > at > org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createNewBroker Instance(Unknown > Source) > at > org.apache.ojb.broker.ta.PBKeyedPoolableObjectFactory.makeObject(Unknown > Source) > at > org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(Unknown > Source) > at > org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createPersisten ceBroker(Unknown > Source) > at > org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(Unkno wn > Source) > at org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source) > at com.spoutnik.test.TestOjb.main(TestOjb.java:38) > rethrown as org.apache.ojb.broker.PBFactoryException: Creation of a new > PB instance failed > at > org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createNewBroker Instance(Unknown > Source) > at > org.apache.ojb.broker.ta.PBKeyedPoolableObjectFactory.makeObject(Unknown > Source) > at > org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(Unknown > Source) > at > org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createPersisten ceBroker(Unknown > Source) > at > org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(Unkno wn > Source) > at org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source) > at com.spoutnik.test.TestOjb.main(TestOjb.java:38) > rethrown as org.apache.ojb.broker.PBFactoryException: Borrow broker from > pool failed: Creation of a new PB instance failed > at > org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createPersisten ceBroker(Unknown > Source) > at > org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(Unkno wn > Source) > at org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source) > at com.spoutnik.test.TestOjb.main(TestOjb.java:38) > failed > org.odmg.DatabaseNotFoundException: OJB can't open repository > repository.xml > Borrow broker from pool failed: Creation of a new PB instance failed > at org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source) > at com.spoutnik.test.TestOjb.main(TestOjb.java:38) > failedOJB can't open repository repository.xml > Borrow broker from pool failed: Creation of a new PB instance failed" > > What should I check? Any suggestions? Need more info? Can anybody send > me a working example? > > Thanks, > Laurent. > > > > -- > To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org> > > > > -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
