|
|
|
Re: Starting Equinox service programmatically [message #56018 is a reply to message #55870] |
Sun, 28 October 2007 23:06  |
Eclipse User |
|
|
|
Hi,
> Sory, that article only tells how to install & start bundles as jars, when
> I tried to install & start bundle as projects it throws the following
> exception:
> org.osgi.framework.BundleException: The activator
> com.farbeyond.core.rap.CorePlugin for bundle com.farbeyond.core is invalid
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:141)
> at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:962)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
> at com.farbeyond.core.test.TestCore.startTest(TestCore.java:84)
> Caused by: java.lang.ClassNotFoundException:
> com.farbeyond.core.rap.CorePlugin
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:402)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
> at
>
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:134)
> ... 26 more
> ... Removed 22 stack frames
> It complains about not being able to find the activator class, I don't
> understand this since PDE does not complain about this and I can launch
> through Equinox OSGI Framework without problems.
> This how I install the bundle:
> String[] args = new String[]{"-debug","-clean"};
> BundleContext context = EclipseStarter.startup(args,null);
> Bundle bundle =
>
context.installBundle("file:/home/setya/Projects/Farbeyond/JProjects+RAP/FBCore ")
> bundle.start() //Exception thrown here.
I've got it working now. It turns out I had to add 'Bundle-ClassPath:
bin/' in MANIFEST.MF. Now I have fully automatic unit testing.
Thanks.
Setya
|
|
|
Powered by
FUDForum. Page generated in 0.05553 seconds