Yes thats solves the Problem,
but then I have to recompile if I want to change the Database settigns, and
One of the reaseons for using OJB is that i dont want to.
Any other Solutions so that OJB uses the user and Password defined in the
repository_databases.xml?
I am clling PersistenceBrokerFactory.createPersistenceBroker("default");
Thank you
> Here is what I use for fetching a PersistenceBroker in my code:
>
> PersistenceBroker broker =
> PersistenceBrokerFactory.createPersistenceBroker(new
> PBKey("default","sa",""));
>
> Where "sa" equals a user id and "" is the password.
>
> Hope this info helps,
>
> Jeff
>
>
> On Saturday 01 March 2003 06:19 pm, you wrote:
> > Hello List,
> >
> > I am using the following Connection descriptor:
> >
> > > jcd-alias="default"
> > default-connection="true"
> > platform="MySQL"
> > jdbc-level="2.0"
> > driver="org.gjt.mm.mysql.Driver"
> > protocol="jdbc"
> > subprotocol="mysql"
> > dbalias="//localhost:3306/fldb?autoReconnect=true"
> > username="root"
> > password="x"
> > batch-mode="false"
> >
> >
> > When creating a Persistence Broker, I am reciving the follwoing
Exception :
> >
> > General error: Access denied for user: '@localhost' to database 'fldb'
> > java.sql.SQLException: General error: Access denied for user:
'@localhost'
> > to database 'fldb'
> > at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
> > at
org.gjt.mm.mysql.Connection.connectionInit(Connection.java:264)
> > at
> > org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
> > at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
> > at java.sql.DriverManager.getConnection(DriverManager.java:512)
> > at java.sql.DriverManager.getConnection(DriverManager.java:193)
> > at
> >
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnecti
> >o nFromDriverManager(Unknown Source)
> > at
> >
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactor
> >y .makeObject(Unknown Source)
> > at
> >
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPo
> >o l.java:710)
> > at
> >
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.getConnection
> >F romPool(Unknown Source)
> > at
> >
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConne
> >c tion(Unknown Source)
> > at
> >
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Unkno
> >w n Source)
> > at
> >
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.localBegin(Unknown
> > Source)
> > at
> >
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.beginTransaction(Unkno
> >w n Source)
> > at
> >
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.beginTransaction
> >( Unknown Source)
> > at com.ckeller.flweb.application.FLApp.login(Unknown Source)
> > ...
> >
> >
> > When Creating a the first PersistenceBroker.
> > Why is OJB using the Databese and and url defined in the repository but
not
> > the username and password?
> >
> > I just updated from OJB 0.9.7 to 0.9.9, in 0.9.7 my database setup
worked
> > well.
> > What am I doing wrong now?
> >
> > Thanks in Advance for your Time
> > - Cornelius
> >
> >
> >
> >
> >
> > --
> > Cornelius Keller
> > Stud. Inf.
> > Humbold Universität Berlin
> > ---
> > crewmeber of space station C-Base -
> > culture communication carbonite in berlin
> > visit: http://www.c-base.org/
> > ---
> >
> >
> > -
> > 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]