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 liooil <li...@ifrance.com> on 2004/12/16 16:51:53 UTC

repository.xml && datasource

OK. Thanks for your advice about where to put my OJB.properties in my
war.

But, i'm confused about the following trace. Is that mean, it found
my repository.xml or not. Or is just not properly coded?
I'm trying to rech a data source ...

16:36:28,484 INFO  [RepositoryPersistor] OJB Descriptor Repository:
file:/D:/lionel/sw/jboss-3.2.2/server/default/tmp/deploy/tmp28529ref_ce.
war/WEB-INF/classes/repository.xml
16:36:28,484 INFO  [RepositoryPersistor] Building repository from
:file:/D:/lionel/sw/jboss-3.2.2/server/default/tmp/deploy/tmp28529ref_ce
.war/WEB-INF/classes/repository.xml
16:36:28,484 DEBUG [RepositoryPersistor] RespostoryPersistor using
SAXParser : org.apache.xerces.jaxp.SAXParserImpl
16:36:28,531 DEBUG [RepositoryXmlHandler] startDoc
16:36:28,546 INFO  [MetadataManager] No repository.xml file found,
starting with empty metadata and connection configuration
16:36:28,562 INFO  [MetadataManager] No 'default-connection' attribute
set in jdbc-connection-descriptors, thus it's currently not possible to
use 'defaultPersistenceBroker()'  convenience method to lookup
PersistenceBroker instances. But it's possible to enable this at runtime
using 'setDefaultKey' method.
16:36:28,562 DEBUG [PersistenceBrokerFactoryDefaultImpl] Obtain broker
from pool, used PBKey is org.apache.ojb.broker.PBKey:
jcdAlias=repository.xml, user=null, password=null
16:36:28,578 INFO  [ConnectionRepository] Could not find
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for PBKey
org.apache.ojb.broker.PBKey: jcdAlias=repository.xml, user=null,
password=null
16:36:28,593 ERROR [DatabaseImpl] Open database failed: Borrow broker
from pool failed, using PBKey org.apache.ojb.broker.PBKey:
jcdAlias=repository.xml, user=null, password=null: Given PBKey
org.apache.ojb.broker.PBKey: jcdAlias=repository.xml, user=null,
password=null does not match in metadata configuration
org.apache.ojb.broker.PBFactoryException: Given PBKey
org.apache.ojb.broker.PBKey: jcdAlias=repository.xml, user=null,
password=null does not match in metadata configuration
 at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.createNewBro
kerInstance(Unknown Source)

 ___[ Pub ]____________________________________________________________
Envie de discuter gratuitement avec vos amis ?
Téléchargez Yahoo! Messenger http://yahoo.ifrance.com


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Multiple instances of MySQL

Posted by Venu Vinod <nv...@yahoo.com>.
Hi,

I was just wondering, how would I configure OJB in the
following scenario.

I have two boxes running MySQL, a master and slave. I
would like to do all the writes to master and reads
from slave. 

Can someone please help me with this.

Thank You
Venu

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: repository.xml && datasource

Posted by Thomas Dudziak <to...@first.fhg.de>.
liooil wrote:

>OK. Thanks for your advice about where to put my OJB.properties in my
>war.
>
>But, i'm confused about the following trace. Is that mean, it found
>my repository.xml or not. Or is just not properly coded?
>I'm trying to rech a data source ...
>
>16:36:28,484 INFO  [RepositoryPersistor] OJB Descriptor Repository:
>file:/D:/lionel/sw/jboss-3.2.2/server/default/tmp/deploy/tmp28529ref_ce.
>war/WEB-INF/classes/repository.xml
>16:36:28,484 INFO  [RepositoryPersistor] Building repository from
>:file:/D:/lionel/sw/jboss-3.2.2/server/default/tmp/deploy/tmp28529ref_ce
>.war/WEB-INF/classes/repository.xml
>16:36:28,484 DEBUG [RepositoryPersistor] RespostoryPersistor using
>SAXParser : org.apache.xerces.jaxp.SAXParserImpl
>16:36:28,531 DEBUG [RepositoryXmlHandler] startDoc
>16:36:28,546 INFO  [MetadataManager] No repository.xml file found,
>starting with empty metadata and connection configuration
>16:36:28,562 INFO  [MetadataManager] No 'default-connection' attribute
>set in jdbc-connection-descriptors, thus it's currently not possible to
>use 'defaultPersistenceBroker()'  convenience method to lookup
>PersistenceBroker instances. But it's possible to enable this at runtime
>using 'setDefaultKey' method.
>16:36:28,562 DEBUG [PersistenceBrokerFactoryDefaultImpl] Obtain broker
>from pool, used PBKey is org.apache.ojb.broker.PBKey:
>jcdAlias=repository.xml, user=null, password=null
>16:36:28,578 INFO  [ConnectionRepository] Could not find
>org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for PBKey
>org.apache.ojb.broker.PBKey: jcdAlias=repository.xml, user=null,
>password=null
>16:36:28,593 ERROR [DatabaseImpl] Open database failed: Borrow broker
>from pool failed, using PBKey org.apache.ojb.broker.PBKey:
>jcdAlias=repository.xml, user=null, password=null: Given PBKey
>org.apache.ojb.broker.PBKey: jcdAlias=repository.xml, user=null,
>password=null does not match in metadata configuration
>org.apache.ojb.broker.PBFactoryException: Given PBKey
>org.apache.ojb.broker.PBKey: jcdAlias=repository.xml, user=null,
>password=null does not match in metadata configuration
> at
>org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.createNewBro
>kerInstance(Unknown Source)
>  
>
It means that no repository.xml was found.
In OJB.properties you specify where the repository.xml file is, relative 
to the location of the OJB.properties file. So in your case the default 
entry of

repositoryFile=repository.xml

should do (e.g. OJB.properties and repository.xml are in the same 
directory, WEB-INF/classes).

Also, if you retrieve a broker instance (for PB Api)/database instance 
(for ODMG Api), you use the same value as you specified in the jcd-alias 
attribute of the jdbc-connection-descriptor tag in repository.xml (see 
here for a description of this tag: 
http://db.apache.org/ojb/docu/guides/repository.html#jdbc-connection-descriptor-N100E6).
If you only have one jdbc-connection-descriptor tag, then you should set 
its default-connection attribute to true, and in PB Api you can then use 
the defaultPersistenceBroker method.

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org