Finally! It seems I found some kind of solution here: http://fusesource.com/issues/browse/ESB-802
Something about *dev:dynamic-update *: Don't know if it's a deffinitive solution or temporal one, but works for me now. On 23 February 2010 10:57, Asier Aranbarri Beldarrain <[email protected]>wrote: > This is the manifest from the *hsqldb bundle*: > > Manifest-Version: 1.0 >> Bundle-ManifestVersion: 2 >> Bundle-Name: Hsqldb >> Bundle-SymbolicName: hsqldb >> Bundle-Version: 1.0.0 >> Export-Package: org.hsqldb, >> org.hsqldb.dbinfo, >> org.hsqldb.error, >> org.hsqldb.index, >> org.hsqldb.jdbc, >> org.hsqldb.jdbc.pool, >> org.hsqldb.lib, >> org.hsqldb.lib.java, >> org.hsqldb.lib.tar, >> org.hsqldb.navigator, >> org.hsqldb.persist, >> org.hsqldb.resources, >> org.hsqldb.result, >> org.hsqldb.rights, >> org.hsqldb.rowio, >> org.hsqldb.scriptio, >> org.hsqldb.server, >> org.hsqldb.store, >> org.hsqldb.types, >> org.hsqldb.util, >> org.hsqldb.util.preprocessor >> Bundle-RequiredExecutionEnvironment: JavaSE-1.6 >> > > This is the manifest from the other jar, the one which calls hsqldb: > > Manifest-Version: 1.0 >> Bundle-ManifestVersion: 2 >> Bundle-Name: %Bundle-Name.1 >> Bundle-SymbolicName: This;singleton:=true >> Bundle-Version: 1.0.0 >> Bundle-Activator: This.Activator >> Bundle-RequiredExecutionEnvironment: JavaSE-1.6 >> Import-Package: org.eclipse.osgi.framework.console;version="1.0.0", >> org.osgi.framework;version="1.3.0", >> org.osgi.util.tracker;version="1.3.1" >> Bundle-ActivationPolicy: lazy >> Service-Component: OSGI-INF/*.xml >> Bundle-ClassPath: log4j-1.2.15.jar, >> ., >> ./config >> Export-Package: this, >> org.apache.log4j, >> (...) >> org.apache.log4j.xml, >> org.gjt.mm.mysql >> Require-Bundle: system.bundle, >> *hsqldb*;bundle-version="1.0.0" >> > > > On 23 February 2010 10:45, Miguel <[email protected]> wrote: > >> 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 >> > >
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
