Thanks for your response.

I've added the the framework packages to the servicebinder jar and that fixes 
the error, thanks.  I'm now getting a new error when the framework tries to 
load one of my bundles:

ERROR: Error starting file:bundle/ContextualisationArchitecture.jar 
(org.osgi.framework.BundleException: Unresolved package in bundle 2: package; 
(&(package=org.ungoverned.gravity.servicebinder)(version>=1.1.0)))
        at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1650)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1517)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
        at 
org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
        at 
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
        at java.lang.Thread.run(Unknown Source)

I've tried creating my bundle jar with the servicebinder.jar included at the 
root level and setting the Bundle-Classpath in the manifest to point to it, but 
this doesn't fix the issue.  Do I have to unpack the servicebinder jar and 
include the packages in all of my bundles?

Also, I had to specify my bundle in the auto start properties of my framework - 
should the service binder not auto-discover my bundles, or have I misunderstood 
completely?

thanks for your time
Mike


Richard S. Hall wrote:
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]

.


--
Mike Evans
Rapid Mobile Ltd.
93 George St. Edinburgh EH2 3ES
Tel: +44 131 243 2502

--
Rapid Mobile Media Limited registered in Scotland No SC263541. Registered for VAT number GB 852 9018 19. Registered office 19A Canning Street, Edinburgh, EH3 8HE.
Contact number: +44(0)131 243 2502
For further information visit our website www.rapid-mobile.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to