My repository.xml is
<jdbc-connection-descriptor
platform="MySQL"
jdbc-level="2.0"
driver=" org.gjt.mm.mysql.Driver"
protocol="jdbc"
dbalias="//localhost:3306/ojb"
username="root"
password="root"
/>
and the OJB.properties is in the folder enhanced which is in the
classpath.
Here is a detailed output when i run my application
Using the following
classpath:./libs/commons-collections-2.0.jar:./libs/commons-pool.jar:./libs/dbsupport_mysql.jar:./libs/jakarta-ojb-0.9.5.jar:./libs/jakarta-ojb-0.9.6.jar:./libs/jdo.jar:./libs/jdori.jar:./libs/jta.jar:./libs/mm.mysql-2.0.12-bin.jar:enhanced
[BOOT] INFO: OJB.properties:
file:/mnt/oc/home/ore/projects/ojbExample/enhanced/OJB.properties
[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] INFO:
Already created persistence broker instances: 0
[DEFAULT] INFO: OJB Descriptor Repository:
file:/mnt/oc/home/ore/projects/ojbExample/enhanced/repository.xml
[DEFAULT] INFO: ...Finished parsing
[org.apache.ojb.broker.util.sequence.SequenceManagerFactory] INFO: Use
sequence manager class: class
org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl
[org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFactory]
INFO: # Create connection pool for JdbcDescriptorKey 1753193428 #
[org.apache.ojb.broker.accesslayer.AbstractConnectionFactory] ERROR:
org/gjt/mm/mysql/Driver
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.getConnectionFromDriverManager(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.AbstractConnectionFactory.getConnection(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryConPooledImpl$ConPoolFactory.makeObject(Unknown
Source)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFactory.lookupConnection(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(Unknown 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
Could not borrow connection from pool -
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor:
JdbcConnectionDescriptor
MySQL
org.gjt.mm.mysql.Driver
jdbc
null
//localhost:3306/ojb
root
root
Any further ideas ?? I am stuck on this now about 3 days :-((
On Mon, 2002-10-21 at 13:41, [EMAIL PROTECTED] wrote:
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>