Re: OJB 0.9.9 & mysql: Database User & password form repository not used?

2003-03-01 Thread Cornelius Keller
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]



OJB 0.9.9 & mysql: Database User & password form repository not used?

2003-03-01 Thread Cornelius Keller
Hello List,

I am using the following Connection descriptor:



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.newConnectio
nFromDriverManager(Unknown Source)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory
.makeObject(Unknown Source)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:710)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.getConnectionF
romPool(Unknown Source)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnec
tion(Unknown Source)
at
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Unknow
n Source)
at
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.localBegin(Unknown
Source)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.beginTransaction(Unknow
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]



migrating to OJB 0.9.9

2003-02-23 Thread Cornelius Keller
Hello OJB usersr/developpers,

I am using OJB since 0.8.7, right now I have updated from 0.9.7 to 0.9.9,
and I must see that there have been some Changes in the PersistenceBroker
Interface and in the PersistenceBroker Faktory.

The first thing is that the method getUniqueString(Class clazz, String
fieldname) has disappeard from the Persistence Broker API.  Can anyone tell
me what I can Use instead?

The second thing is that the method to return PersistenceBrokers back to the
pool has disappeard from the PersistenceBrokerFactory, how is it done now?

Thank you 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]