I am trying to become familiar with the OSGI platform and I read a German book about it. I tried to follow every tutorial step to get a simple 'hello world' bundle running but it fails.
Here are the steps I've done:
Running this gives me the following message. Can anybody help me to get it running?
The error messages can be found here:
osgi> !SESSION 2011-06-25 09:30:13.625 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_24 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -dev file:C:/Documents and Settings/itsme/eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/Hello World Example/dev.properties -os win32 -ws win32 -arch x86 -consoleLog -console
!ENTRY org.eclipse.equinox.jsp.jasper 4 0 2011-06-25 09:30:17.609 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.jsp.jasper_1.0.300.v20110502 [37]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.jasper.servlet; version="[0.0.0,6.0.0)" at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
I'm not sure exactly how you accomplished each step of that tutorial which you are following, but Lars Vogel's eclipse tutorials are incredibly useful.
I just tested his Hello World OSGi tutorial (written for Eclipse 3.7) and it worked fine for me, so I recommend trying that.
Alternatively, if you insist on troubleshooting your existing project:
It sounds like you haven't got your target platform activated correctly.
Try clicking the Validate Bundles button in your OSGi framework run configuration (in the debug button's drop down menu, choose Debug Configurations) and see if that passes. If it doesn't, try unticking Target Platform, and click the Add Required Bundles buttons, then try again.
I'm running Eclipse 3.6, and I'm able to launch a new plugin project using this equinox 3.7 release build as my target platform without any validation errors.