Dima O
Dima O

Reputation: 83

NoClassDefFoundError in Osgi w/ Felix, ant

After a lot of work migrating our code to another & fixing all the manifests and the bundles, when I try to run the applet on the server I get many errors like this one:

java.lang.NoClassDefFoundError: org/jitsi/service/configuration/ConfigurationService
    at net.java.sip.communicator.service.resources.AbstractResourcesService.<init>(AbstractResourcesService.java:127)
    at net.java.sip.communicator.impl.resources.ResourceManagementServiceImpl.<init>(ResourceManagementServiceImpl.java:48)
    at net.java.sip.communicator.impl.resources.ResourceManagementActivator.start(ResourceManagementActivator.java:36)
    at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1243)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:620)
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1822)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
    at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jitsi.service.configuration.ConfigurationService not found by [12515]
    at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
    at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:670)
    at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:102)
    at org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1426)
    at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:747)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
    at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
    at java.lang.ClassLoader.loadClass(Unknown Source)

All the bundles are getting resolved properly, and even when I tried to get some code out of the external jar into our code, it still threw me that error, I know that's a problem in Felix that I need to fix, but I don't know where can I start, all the bundles starting in their proper time...

I'm building the app with ant/Felix.

Maybe it's a problem with the activator? Thanks for all the help, love to hear some opinions...

Upvotes: 2

Views: 1847

Answers (1)

Neil Bartlett
Neil Bartlett

Reputation: 23948

Your bundle is using the class org.jitsi.service.configuration.ConfigurationService but it doesn't import the package. Make sure that org.jitsi.service.configuration is listed in the Import-Package header in your bundle's manifest.

Upvotes: 3

Related Questions