Hi Guys,

I'm running JDK1.4.1, on Win2K, using IntelliJ Ariadne as an IDE. I've got
MySQL 3.23.52-nt (with the connector-j driver), and OJB 0.9.5.

I'm having a problem getting MySQL to work with OJB. The tests run okay
(actually there are a handful of errors, but the DB is populated, and most
of the tests pass). I can't get my application to connect - I'm getting
this error:

[BOOT] INFO: OJB.properties: file:/D:/Dev/Book/OJB.properties
[BOOT] ERROR: Cannot get OJB properties file, use default settings!
java.lang.NoClassDefFoundError:
org/apache/commons/pool/KeyedPoolableObjectFactory
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory.class$(Unknown
Source)
        at
org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory.instantiate(Unknow
n Source)
        at
org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory.instance(Unknown
Source)
        at
org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(Unkn
own Source)
        at com.sams.Blog.populate(Blog.java:36)
        at com.sams.Blog.iterator(Blog.java:24)
        at Main.main(Main.java:12)
Exception in thread "main" Process terminated with exit code 1

My descriptor repository looks like this:

<descriptor-repository version="0.9.5" isolation-level="read-uncommitted">
        <jdbc-connection-descriptor
                platform="MySQL"
                jdbc-level="2.0"
                driver="com.mysql.jdbc.Driver"
                protocol="jdbc"
                subprotocol="mysql"
                dbalias="//localhost:3306/ojb"
                username=""
                password="" />
</descriptor-repository>

I have made relevant changes in mysql.profile too.

My connection code is:

  PBKey key = new PBKey("d:/dev/book/config/repository.xml", "admin",
"admin");
  PersistenceBroker broker =
PersistenceBrokerFactory.createPersistenceBroker(key);

Any ideas about what's happening would be gratefully received - I'm pulling
my hair out on this one.

Cheers,

Bryan

    b r y a n   d o l l e r y
c h a o s   e n g i n e e r s
     www.ChaosEngineers.co.nz
             +64 (0)21 330607


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to