Hi,

On Tue, 14 Oct 2003 15:45:44 +0200, Christophe.Demarey <[EMAIL PROTECTED]> wrote:

Hi again,

The property "ConnectionManagerClass" was well setted.
But the jdo runtime didn't find the OJB.properties file. So, default values were setted and I got an exception.
Since I put the OJB.properties file in my classpath, it's good.


I still have two questions :
1) How create the database schema automatically ?

OJB use torque to do this, but it's not automatically. More info about 'mapping stuff' you can find under http://db.apache.org/ojb/howto-build-mappings.html


2) Is there any way to generate the "repository.xml" file from a jdo file?

I'm not familiar with the jdo part of OJB. I think currently
this is not supported. Maybe someone else can tell you more
about this.

regards,
Armin

Best Regards,
Christophe D.

PS: Congratulations for the quality of feedback. :=)


Armin Waibel wrote:
Hi again,

On Tue, 14 Oct 2003 15:05:18 +0200, Christophe.Demarey <[EMAIL PROTECTED]> wrote:

Armin Waibel wrote:

Hi,

On Tue, 14 Oct 2003 14:37:02 +0200, Christophe.Demarey <[EMAIL PROTECTED]> wrote:

Hi,

When I test my application with OJB, I have an error with the "ConnectionManagerClass".



Do you mix different OJB version? E.g. configuration file from an earlier version (especially OJB.properties) in classpath?

No, I only have the db-ojb-1.0.rc4 version. I didn't modify the OJB.properties file.

hmm, in your OJB.properties file the property

ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl exist?

[org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: ConfigurableFactory configuration key class for key'ConnectionManagerClass' does not exist.

The error says that this key can not be found.


Armin




regards, Armin

Have you any idea about this ?
I have put the output error bellow.

Regards.

PS: I still have a question: Is there a way to generate the "repository.xml" file from a JDO file ?


Error report :
--------------
[org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl] INFO: Create PersistenceBroker instance pool, pool configuration was {whenExhaustedAction=0, maxIdle=-1, maxActive=21, maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=false} [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/localhome/test/repository.xml
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO: Found attribute (name=grabSize, value=20) but I could not assign them to a descriptor
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO: Found attribute (name=autoNaming, value=true) but I could not assign them to a descriptor
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO: Found attribute (name=globalSequenceId, value=false) but I could not assign them to a descriptor
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO: Found attribute (name=globalSequenceStart, value=10000) but I could not assign them to a descriptor
[org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: Read class descriptors took 482 ms
[org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/localhome/test/repository.xml
[org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: Read connection repository took 168 ms
[org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl] INFO: Set default PBKey: org.apache.ojb.broker.PBKey: jcdAlias=default, user=toto, password=*****
[org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: ConfigurableFactory configuration key class for key'ConnectionManagerClass' does not exist.
[org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl] ERROR: Creation of a new PB instance failed
null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createNewBrokerInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl$PBKeyedPoolableObjectFactory.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:748) at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown Source)
at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown Source)
at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
at org.objectweb.openccm.services.pss.jdo.lib.CatalogBase.begin_tx(CatalogBase.java:121) at test.Test.main(Unknown Source)
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 org.objectweb.util.launcher.Launcher.run(Launcher.java:349)
at org.objectweb.util.launcher.Launcher.main(Launcher.java:383)
Caused by: org.apache.ojb.broker.PersistenceBrokerException: ConfigurableFactory configuration key class for key'ConnectionManagerClass' does not exist.
at org.apache.ojb.broker.util.factory.ConfigurableFactory.configure(Unknown Source)
at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.configure(Unknown Source)
at org.apache.ojb.broker.util.factory.ConfigurableFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.getInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.<init>(Unknown Source)
... 22 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createNewBrokerInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl$PBKeyedPoolableObjectFactory.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:748) at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown Source)
at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown Source)
at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
at org.objectweb.openccm.services.pss.jdo.lib.CatalogBase.begin_tx(CatalogBase.java:121) at test.Test.main(Unknown Source)
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 org.objectweb.util.launcher.Launcher.run(Launcher.java:349)
at org.objectweb.util.launcher.Launcher.main(Launcher.java:383)
Caused by: org.apache.ojb.broker.PersistenceBrokerException: ConfigurableFactory configuration key class for key'ConnectionManagerClass' does not exist.
at org.apache.ojb.broker.util.factory.ConfigurableFactory.configure(Unknown Source)
at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.configure(Unknown Source)
at org.apache.ojb.broker.util.factory.ConfigurableFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.getInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.<init>(Unknown Source)
... 22 more
rethrown as org.apache.ojb.broker.PBFactoryException: Creation of a new PB instance failed
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createNewBrokerInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl$PBKeyedPoolableObjectFactory.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:748) at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown Source)
at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown Source)
at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
at org.objectweb.openccm.services.pss.jdo.lib.CatalogBase.begin_tx(CatalogBase.java:121) at test.Test.main(Unknown Source)
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 org.objectweb.util.launcher.Launcher.run(Launcher.java:349)
at org.objectweb.util.launcher.Launcher.main(Launcher.java:383)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source)
... 17 more
Caused by: org.apache.ojb.broker.PersistenceBrokerException: ConfigurableFactory configuration key class for key'ConnectionManagerClass' does not exist.
at org.apache.ojb.broker.util.factory.ConfigurableFactory.configure(Unknown Source)
at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.configure(Unknown Source)
at org.apache.ojb.broker.util.factory.ConfigurableFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.getInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.<init>(Unknown Source)
... 22 more
rethrown as org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed: Creation of a new PB instance failed
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source)
at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown Source)
at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown Source)
at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
at org.objectweb.openccm.services.pss.jdo.lib.CatalogBase.begin_tx(CatalogBase.java:121) at test.Test.main(Unknown Source)
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 org.objectweb.util.launcher.Launcher.run(Launcher.java:349)
at org.objectweb.util.launcher.Launcher.main(Launcher.java:383)
Caused by: org.apache.ojb.broker.PBFactoryException: Creation of a new PB instance failed
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createNewBrokerInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl$PBKeyedPoolableObjectFactory.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:748) ... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source)
... 17 more
Caused by: org.apache.ojb.broker.PersistenceBrokerException: ConfigurableFactory configuration key class for key'ConnectionManagerClass' does
not exist.
at org.apache.ojb.broker.util.factory.ConfigurableFactory.configure(Unknown Source)
at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.configure(Unknown Source)
at org.apache.ojb.broker.util.factory.ConfigurableFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.<init>(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerFactory.getInstance(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.<init>(Unknown Source)
... 22 more






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