could you please send your manifest ? Miguel Sent from Madrid, Spain
On Tue, Feb 23, 2010 at 10:41 AM, Asier Aranbarri Beldarrain < [email protected]> wrote: > Hi all: > > Neil, I tried to use both of the methods, first including hsqldb in my > bundle and at second time making an independent bundle with hsqldb, but none > of them seem to work. > They work tho on eclipse (two of them), but not when I export it to equinox > bundles. > This is the exception i'm getting all the time: > > *java.lang.ClassNotFoundException: org.hsqldb.jdbc.JDBCDriver // (or ---> >> org.hsqldb.jdbcDriver , same problem with this) >> at >> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506) >> at >> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) >> at >> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) >> at >> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:252) >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:169) >> (...) >> at >> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) >> at java.security.AccessController.doPrivileged(Native Method) >> at >> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) >> at >> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) >> at >> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:353) >> at >> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370) >> at >> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068) >> at >> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:554) >> at >> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:461) >> at >> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:246) >> at >> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:442) >> at >> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) >> at >> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337) >> * > > > > Thanks for your help to all of you : ) > > > > > On 22 February 2010 12:45, Neil Bartlett <[email protected]> wrote: > >> There is nothing wrong with using the org.hsqldb.jdbc.JDBCDriver class. >> >> Asier: have you packaged HSQLDB as an OSGi bundle, or have you added >> it to your bundle classpath using the Bundle-Classpath header? Note >> that it is not enough to simply put a copy of hsqldb.jar inside your >> bundle. However, I strongly recommend "bundleizing" HSQLDB so that it >> can be used by multiple client bundles. I have successfuly used the >> following bnd script to achieve this bundleization: >> >> -----8<------ >> Bundle-SymbolicName: org.hsqldb >> Bundle-Version: 1.8.0.v09 >> Export-Package: org.hsqldb*;version=${Bundle-Version} >> Import-Package: javax.servlet*;resolution:=optional,\ >> javax.swing*;resolution:=optional,\ >> javax.security.cert;resolution:=optional,\ >> sun*;resolution:=optional,\ >> * >> Bundle-RequiredExecutionEnvironment: J2SE-1.4 >> -----8<------ >> >> On Mon, Feb 22, 2010 at 11:31 AM, Miguel <[email protected]> wrote: >> > hi, I guess org.hsqldb.JDBCDriver is not the correct route ;), isn't it? >> , >> > at least the class you are pointing at can be found here: >> > org/hsqldb/jdbc/JDBCDriver.class within the hsqldb.jar >> > Miguel >> > Sent from Madrid, Spain >> > >> > On Mon, Feb 22, 2010 at 12:10 PM, Asier Aranbarri Beldarrain >> > <[email protected]> wrote: >> >> >> >> Hi Miguel: >> >> >> >> Thanks for the answer. Yes, I set up the classpath correctly. The odd >> >> thing is that I also have a .jar included in an osgi bundle >> >> (mysqlconnector.jar) the same exact way and works perfect. >> >> >> >> >> >> >> >> On 22 February 2010 11:43, Miguel <[email protected]> wrote: >> >>> >> >>> you should not include libraries inside bundles. It is better to >> "bundle" >> >>> then. >> >>> However, if you made that other way, did you set up the correct >> classpath >> >>> in the manifest and import the correct package? >> >>> Miguel >> >>> >> >>> >> >>> On Mon, Feb 22, 2010 at 11:32 AM, Asier Aranbarri Beldarrain >> >>> <[email protected]> wrote: >> >>>> >> >>>> Hi: >> >>>> >> >>>> I made a new Db using HSQLDB (http://hsqldb.org/) and imported it >> to >> >>>> my eclipse framework, making a Java program work with it(actually it >> does >> >>>> correctly). >> >>>> >> >>>> Now mi issue is that I need to export that to an Osgi bundle (using >> >>>> equinox). HSQLDB uses the hsqldb.jar library, which is necessary so >> that >> >>>> hsqldb driver can be found. My problem is that equinox is not finding >> it >> >>>> (org.hsqldb.JDBCDriver not found exception all the time). >> >>>> >> >>>> When I export the package I include the hsqldb.jar in the Build >> >>>> Configuration, but somehow, when I run equinox, it does not recognize >> it. >> >>>> >> >>>> Any possible solution? >> >>>> >> >>>> Thanks in advance, >> >>>> >> >>>> Asier >> >>>> >> >>>> >> >>>> >> >>>> _______________________________________________ >> >>>> OSGi Developer Mail List >> >>>> [email protected] >> >>>> https://mail.osgi.org/mailman/listinfo/osgi-dev >> >>> >> >>> >> >>> _______________________________________________ >> >>> OSGi Developer Mail List >> >>> [email protected] >> >>> https://mail.osgi.org/mailman/listinfo/osgi-dev >> >> >> >> >> >> _______________________________________________ >> >> OSGi Developer Mail List >> >> [email protected] >> >> https://mail.osgi.org/mailman/listinfo/osgi-dev >> > >> > >> > _______________________________________________ >> > OSGi Developer Mail List >> > [email protected] >> > https://mail.osgi.org/mailman/listinfo/osgi-dev >> > >> >> _______________________________________________ >> OSGi Developer Mail List >> [email protected] >> https://mail.osgi.org/mailman/listinfo/osgi-dev >> > > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev >
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
