geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trygve Hardersen <>
Subject plugin classloader question
Date Tue, 18 Aug 2009 16:17:05 GMT

I'm having some problems with classloading and Geronimo plugins. Hopefully
some of you can share your insight into this.

I want to use the OpenSymphony Quartz scheduler in my application. The
current version is opensymphony/quartz/1.6.5. OpenEJB also uses Quartz, but
an older version quartz/quartz/1.5.2. The Geronimo plugin I want to use
Quartz from also depends on
org.apache.geronimo.configs/openejb/2.2-SNAPSHOT, which comes with Quartz
since it depends on OpenEJB.

The problem I'm having is making my plugin load Quartz from the classloader
of my plugin, not from the org.apache.geronimo.configs/openejb classloader.
The problem with loading it from that classloader is, besides getting the
old Quartz version, that commons-dbcp/commons-dbcp is not available in that
classloader. commons-dbcp is needed to use Quartz with a JDBC JobStore (at
least with MySQL):

java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource in
classloader org.apache.geronimo.configs/openejb/2.2-SNAPSHOT/car

I've tried to update OpenEJB to use the same Quartz version as I do so the
groupid and artifactid are the same, but I'm still unable to exclude it from
the classloader of my plugin. Does anyone know how this can be achieved?
What I want is to create a Geronimo plugin that depends on
org.apache.geronimo.configs/openejb but loads Quartz from its own
classloader, not that of org.apache.geronimo.configs/openejb.

Or to put it more generally, how can I prevent classes defined in dependent
plugins from being used in the current plugin?

Many thanks!

Trygve Hardersen
Jotta AS

View raw message