naturally my jdbc driver and external jars in <dist-base>/lib
and specify Class-Path: ../lib/mysql.jar ../lib/velocity.jar in bar's
manifest file.
but it's not work.

JdbcDataSource is loaded by avalon-loader.jar's ClassLoader. ->A
but jdbc driver loaded by my blocks's ClassLoader. -> B
ClassLoader B is child of A.
because ClassLoader A do not find jdbc driver which loaded by ClassLoader B.

I fork datasource.* code to my own version and packaging with block's bar.
Just then my problem solved. :-)

----- Original Message -----
From: "Peter Donald" <[EMAIL PROTECTED]>
To: "Avalon Development" <[email protected]>
Sent: Tuesday, February 27, 2001 4:17 PM
Subject: Re: Why DataSourceComponent do not load jdbc driver internaly?


> At 09:31  26/2/01 -0500, Berin Loritsch wrote:
> >> I load jdbc driver class in my block.
> >> but block's class loader is child of JdbcDataSource's class loader
> >> therefore JdbcDataSource do not load jdbc driver. :-)
> >> because JdbcDataSource's class loader do not access parents class
loader.
> >> ...
> >
> >I see. In order for this to be usable in multiple environments, we need
> >to have the JdbcDataSource load the class at Config time.  That can be
> >fixed.
>
> Another alternative in the meantime is to place the jdbc driver jars in
> <dist-base>/lib which I think will work.
>
> Cheers,
>
> Pete
>
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof."                   |
> |              - John Kenneth Galbraith               |
> *-----------------------------------------------------*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Reply via email to