Have you tried setting these properties in your repository.xml file 
instead
of your source.
Also make sure the OJB.properties and the xml files are on the 
classpath as
well as the MySQL Driver.

----- Original Message -----
From: "Oliver Refle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 21, 2002 4:14 AM
Subject: OJB JDO API


> Hello all,
> i have a little problem with the JDP API. When i start my enhanced
> application (use jdori enhancer)
> he always throws a ClassNotFoundException. The class he cannot load is
> the driver class of my
> JDBC Driver.
>
> The following code created my PersistenceManager
>
> public PersistenceManager createPersistenceManager(String user, String
> pass){
>     setConnectionDriverName("org.gjt.mm.mysql.Driver");
>     setConnectionURL("jdbc:mysql://10.0.2.91/ojb");
>     setConnectionUserName(user);
>     setConnectionPassword(pass);
> }
>
> but the following nested exception occurs:
>
> java.lang.ClassNotFoundException:  org/gjt/mm/mysql/Driver
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:207)
>         at
>
org.apache.ojb.broker.accesslayer.AbstractConnectionFactory.getConnectio
nFro
mDriverManager(Unknown Source)
>         at
>
org.apache.ojb.broker.accesslayer.AbstractConnectionFactory.getConnectio
n(Un
known Source)
>         at
>
org.apache.ojb.broker.accesslayer.ConnectionFactoryConPooledImpl$ConPool
Fact
ory.makeObject(Unknown Source)
>         at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown
> Source)
>         at
>
org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFactory.look
upCo
nnection(Unknown Source)
>         at
> org.apache.ojb.broker.accesslayer.ConnectionManager.getConnection
(Unknown
Source)
>         at
> org.apache.ojb.broker.accesslayer.ConnectionManager.localBegin(Unknown
> Source)
>         at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.beginTransaction
(Unknow
n Source)
>         at org.apache.ojb.jdo.JDOTransaction.begin(Unknown Source)
>         at OC.ojbsample.main.StartTest.main(Unknown Source)
> [org.apache.ojb.broker.accesslayer.ConnectionManager] ERROR: Can't get
> connection
>
>
>
> When i try manually to load the driver with
> Class.forName("org.gjt.mm.mysql.Driver");
>
> it works fine.
>
> Any Idea ??
>
> Thx
> Oliver
>



--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to