Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] FW: Debugging Equinox bundles (not in Eclipse)

You've probably got

Import-Package: org.osgi.framework

missing from your Manifest. Eclipse 3.2 didn't used to barf at that,
but Eclipse 3.3 does. (It's basically a fixed bug)

Alex.

On 16/02/07, Richard Colvin <rcolvin@xxxxxxxxxxx> wrote:




I'm trying to start equinox and one bundle in an IDE (but not Eclipse, where
I know the support is built in) using the following code:



public class StartEquinox {

    public static void main(String[] args) {

        try {

            BundleContext bc = EclipseStarter.startup(new
String[]{"-console"}, null);

            InputStream is = new
FileInputStream("./myfirstbundle/myfirstbundle.jar");

            bc.installBundle("myfirstbundle ", is).start();

        } catch (Exception e) {

            e.printStackTrace();

        }



    }

}



What I get is a stack trace:



org.osgi.framework.BundleException: The activator
com.stentra.myfirstbundle.Activator for bundle
myfirstbundle is invalid

            at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)

            at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:962)

…



Caused by: java.lang.NoClassDefFoundError:
org/osgi/framework/BundleActivator



Using  java –jar <equinox.jar> and intalling stuff manually works fine.



So presumably there is some classloader type issues here. Is there any easy
way round this?



Thanks in advance.





Richard Colvin


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top