posted 11 years ago
Update:
I've since fixed this...I wasn't putting my classpath jars in the actual jar I was building. That fixed my issue.
Hello,
Now that I have managed to get Equinox to work, I am running into a different problem.
I have a bunch of external jars(around 10) that I use for one of my bundles. For example, I use the commons-lang3-3.1.jar for various things. When I run my OSGi framework in Eclipse - it all works great. I just need to make sure I add them to my bundle's class path.
However, when I execute it outside of Eclipse, it throws java.lang.NoClassDefFoundError: errors. I'm not sure why this is happening.
I've done a bit of research and it seems that I have really two options:
1. Place the jar file in the root directory of my bundle (in this case, the bundle's jar file), and then make sure that the manifest file has a proper Export-Package on it.
I have tried this - and it still cannot find the jar.
2. Make a bundle of the jar file, and install that, ensuring all dependencies are resolved. THIS does NOT work for jar files. However, if I copy the actual source and use that instead of a jar file within the bundle, then it works. But I won't be able to do this for all of my jars since the source isn't present and I don't want to have to build every single external jar I use...
I'm pretty new to OSGi, and any help would be useful.
The below is from option 1:
Stacktrace:
Here is the manifest file:
The .jar file is in the root directory of this bundle. It is in included in the class path and the export...I also see it in the packages command:
I am confused as to why this doesn't work - it can be seen by the framework - my bundle just can't load it!!
Thanks.