felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerome.moli...@gmail.com
Subject Re: Connect a bundle to a data base
Date Wed, 21 Mar 2012 17:38:29 GMT
Hi...
Your driver class is not visible from the bundle where you want to invoke dynamically (class.forname)
the class.....logic....
Exposing a real osgi service as suggested wisely by neil is the only simple way to avoid that
error...

Jerome
---- Envoyé avec BlackBerry® d'Orange ----

-----Original Message-----
From: elMateo <soyelmateo@gmail.com>
Date: Wed, 21 Mar 2012 18:35:03 
To: <users@felix.apache.org>
Reply-To: users@felix.apache.org
Subject: Re: Connect a bundle to a data base

I'm struggling with this exception of
Apache java.lang.NoClassDefFoundError:
com/mysql/jdbc/jdbc2/optional/MysqlDataSource. Because I have the MySQL
Connect/J bundle running in Apache Felix. Sometimes I have another
exception, java.lang.NoClassDefFoundError: javax/sql/DataSource, and I
don't know why :(

On Wed, Mar 21, 2012 at 5:20 PM, Christian Schneider <
chris@die-schneider.net> wrote:

> The solution described by Neil should allow that and should be easy to
> implement. Using the service to connect your other bundles to the
> datasource even makes them
> very indepentent of the implementation of the "bridge bundle". A user
> bundle could import the DataSource from my solution with blueprint or the
> handwritten java bridge bundle
> and would not have to be changed in any way.
>
> What exactly are you struggling with?
>
> Christian
>
> Am 21.03.2012 15:43, schrieb elMateo:
>
>  What I want it's only a bundle that work as a bridge to  whatever
>> database.
>> The other bundles access to this one to retrieve any information from
>> external databases. But I don't get this :(
>>
>> On Wed, Mar 21, 2012 at 2:38 PM, Donald Whytock<dwhytock@gmail.com>
>>  wrote:
>>
>>  What you probably want in the long run is a datasource-generating
>>> service, to which you pass the database URI.  You can put things in
>>> the properties of the service to indicate whether it's Oracle, mySQL,
>>> MSSQL, etc., so that you can have multiple generating services at the
>>> same time.
>>>
>>> Don
>>>
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<users-unsubscribe@felix.apache.org>
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>
> --
>
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<users-unsubscribe@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Mime
View raw message