Yes, I'm developing my application with Maven. I'm going to read this tutorial. Maybe I'm doing something wrong
On Wed, Mar 21, 2012 at 7:43 PM, Christian Schneider < [email protected]> wrote: > In the bundle that creates the DataSource you have to have an > Import-Package statement in the Manifest for each package you use. > So at least com.mysql.jdbc.optional and javax.sql.DataSource. It is quite > hard to do that by hand. If you use maven to build your bundle then > you should use the maven bundle plugin which analyzes your java code and > creates the necessary statements for the Manifest. > > In this tutorial I describe how to do it: > http://www.liquid-reality.de/**display/liquid/2011/02/15/** > Karaf+Tutorial+Part+1+-+**Installation+and+First+**application<http://www.liquid-reality.de/display/liquid/2011/02/15/Karaf+Tutorial+Part+1+-+Installation+and+First+application> > > The tutorial is about karaf but the bundle creation is the same if you use > pure felix. Only the deployment may be different. > > Christian > > > Am 21.03.2012 18:35, schrieb elMateo: > >> 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< >> [email protected]> 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<[email protected]> >>>> 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.**apac**he.org<http://apache.org> >>>>> <users-unsubscribe@**felix.apache.org<[email protected]> >>>>> > >>>>> >>>>> For additional commands, e-mail: [email protected] >>>>> >>>>> >>>>> >>>>> -- >>> >>> 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.**apac**he.org<http://apache.org> >>> <users-unsubscribe@**felix.apache.org<[email protected]> >>> > >>> >>> For additional commands, e-mail: [email protected] >>> >>> >>> > > -- > 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<[email protected]> > For additional commands, e-mail: [email protected] > >

