Community
Participate
Working Groups
Build Identifier: 2.1.0.RELEASE Apache Derby imports its dependencies using DynamicImport-Package - it has no explicit Import-Packages but it does have an activator. The Derby bundle can be deployed standalone, however, when contained within a PAR file, Virgo complains that it cannot find the BundleActivator class: Caused by: org.osgi.framework.BundleException: The activator org.apache.derby.osgi.EmbeddedActivator for bundle org.unwiredplanet.ease-1.0.0.SNAPSHOT-derby is invalid at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284) at org.eclipse.virgo.kernel.core.internal.StandardBundleStarter.start(StandardBundleStarter.java:57) etc Caused by: java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator 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:107) at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135) I have reproduced this with my own homespun bundle, and it appears on the surface to specifically related to the use of DynamicImport-Package. Let me know if you would like me to email you an example par. Reproducible: Always Steps to Reproduce: 1.Create PAR with V10.6 of Apache Derby (no need for any other bundles) 2.Deploy PAR 3.Et Viola
Thanks for reporting this. Dynamic imports have several downsides, but I haven't seen this one before! Would it be possible to attach the homespun example PAR to this bug?
Created attachment 184695 [details] Bundle with Dynamic Import and Activator (Works) Working bundle with simple Activator and imports resolved using DynamicImport-Package. (For some reason this is how Apache Derby does it.)
Created attachment 184698 [details] PAR containing Bundle with Dynamic Import and Activator (Broken) PAR containing bundle (see attachment 184695 [details]) that fails to deploy.
Thanks Tara. That's so helpful. :-)
Hi Tara, This bug is fixed and will be available in the next milestone. Thanks for the detailed bug report :)
i'll resolve the bug now
Tagging for milestone 2.2.0.M02 although this may turn into 3.0.0.M01.
closing...