Hopefully someone can help me with this problem that is stopping me from 
progressing with Felix ?

I have a simple bundle based on the example DictionaryBundle in the examples 
with the added complexity of an embedded jar file, is this case 
commons-lang.jar.

I can install and start the bundle into Felix when it is run from the command 
line (java -jar bin/felix.jar) and I can see the embedded jar being extracted 
in the felix-cache directory etc. In by Activator.start() method I also invoke 
the bundle code to prove that it works OK.

If I write some other code, closely following the patterns described at 
http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-embedding,
 I find that, when the bundle is started, I get an error:

Could not create framework: org.osgi.framework.BundleException: Activator start 
error in bundle [5].
     [java] org.osgi.framework.BundleException: Activator start error in bundle 
[5].
     [java]               at 
org.apache.felix.framework.Felix.activateBundle(Felix.java:1899)
     [java]               at 
org.apache.felix.framework.Felix.startBundle(Felix.java:1769)
     [java]               at 
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)
     [java]               at com.bt.test.Main.main(Main.java:298)
     [java] Caused by: java.lang.NoClassDefFoundError: 
org/apache/commons/lang/StringUtils
     [java]               at 
com.bt.test.DictionaryImpl.checkWord(DictionaryImpl.java:24)
     [java]               at 
com.bt.test.DictionaryActivator.start(DictionaryActivator.java:33)
     [java]               at 
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
     [java]               at 
org.apache.felix.framework.Felix.activateBundle(Felix.java:1852)
     [java]               ... 3 more
     [java]

I have studied the Main class from the Felix jar for differences to my code and 
cannot find anything obvious. Any clues appreciated.

Thanks

Adrian Smith
BT Group

Reply via email to