Original versions of the Service Binder did not include Import-Package
statements for the org.osgi.framework packages in its manifest (since
this wasn't necessary under Oscar). So, check SB's manifest and see if
you need to add them, if so, extract, add, and rearchive. Otherwise,
build the SB in Felix' trunk.
-> richard
Mike Evans wrote:
Hi All,
I have embedded Felix into Tomcat and I'm trying to start the service
binder bundle so that it can discover and bind my bundles. When Felix
tries to start the service binder I get the following NCDFE :
ERROR: Error starting file:bundle/servicebinder1.0.jar
(org.osgi.framework.BundleException: Activator start error.)
java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass(ContentClassLoader.java:162)
...
I'm using the following code to start the service binder
// Create a case-insensitive configuration property map.
Map<String, String> configMap = new StringMap(false);
// Configure the Felix instance to be embedded in Tomcat.
configMap.put(FelixConstants.SERVICE_URLHANDLERS_PROP, "false");
configMap.put(FelixConstants.EMBEDDED_EXECUTION_PROP, "true");
// Add core OSGi packages to be exported from the class
path
// via the system bundle.
configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
"org.osgi.framework; version=1.3.0," +
"org.osgi.util.tracker; version=1.3.1," +
"org.osgi.service.packageadmin; version=1.2.0," +
"org.osgi.service.startlevel; version=1.0.0," +
"org.osgi.service.url; version=1.0.0" );
// Explicitly specify the directory to use for caching
bundles.
configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, "cache");
// Specify the auto start plugin
configMap.put(FelixConstants.AUTO_START_PROP +".1",
"file:bundle/servicebinder1.0.jar");
What do I have to do to get the service binder working?
many thanks
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]