classnotfoundexception - Caused by: java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator: when importing multiple packages -


i'm trying out osgi samples apache felix

the first , second examples installed , started fine. third example there dependency osgi , installed service fails class not found error.

manifest.mf

manifest-version: 1.0  bundle-manifestversion: 2  bundle-name: french dictionary bundle-symbolicname: fr-dict bundle-description: bundle registers french dictionary service bundle-vendor: apache felix bundle-version: 1.0.0 bundle-activator: tutorial.example2b.activator import-package: org.osgi.framework,   tutorial.example2.service 

note: have given new line after last line.

g! start file:/users/johne/desktop/bundle-dict-fr.jar                                                                                                                                                                    10:18:39 org.osgi.framework.bundleexception: activator start error in bundle fr-dict [11].     @ org.apache.felix.framework.felix.activatebundle(felix.java:2289)     @ org.apache.felix.framework.felix.startbundle(felix.java:2145)     @ org.apache.felix.framework.bundleimpl.start(bundleimpl.java:998)     @ org.apache.felix.gogo.command.basic.start(basic.java:739)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:498)     @ org.apache.felix.gogo.runtime.reflective.invoke(reflective.java:136)     @ org.apache.felix.gogo.runtime.commandproxy.execute(commandproxy.java:91)     @ org.apache.felix.gogo.runtime.closure.executecmd(closure.java:571)     @ org.apache.felix.gogo.runtime.closure.executestatement(closure.java:497)     @ org.apache.felix.gogo.runtime.closure.execute(closure.java:386)     @ org.apache.felix.gogo.runtime.pipe.docall(pipe.java:417)     @ org.apache.felix.gogo.runtime.pipe.call(pipe.java:229)     @ org.apache.felix.gogo.runtime.pipe.call(pipe.java:59)     @ java.util.concurrent.futuretask.run(futuretask.java:266)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617)     @ java.lang.thread.run(thread.java:745) caused by: java.lang.noclassdeffounderror: org/osgi/framework/bundleactivator     @ java.lang.classloader.defineclass1(native method)     @ java.lang.classloader.defineclass(classloader.java:763)     @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.defineclass(bundlewiringimpl.java:2375)     @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.findclass(bundlewiringimpl.java:2159)     @ org.apache.felix.framework.bundlewiringimpl.findclassorresourcebydelegation(bundlewiringimpl.java:1578)     @ org.apache.felix.framework.bundlewiringimpl.access$200(bundlewiringimpl.java:80)     @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.loadclass(bundlewiringimpl.java:2018)     @ java.lang.classloader.loadclass(classloader.java:357)     @ org.apache.felix.framework.bundlewiringimpl.getclassbydelegation(bundlewiringimpl.java:1404)     @ org.apache.felix.framework.felix.createbundleactivator(felix.java:4505)     @ org.apache.felix.framework.felix.activatebundle(felix.java:2220)     ... 19 more caused by: java.lang.classnotfoundexception: org.osgi.framework.bundleactivator not found fr-dict [11]     @ org.apache.felix.framework.bundlewiringimpl.findclassorresourcebydelegation(bundlewiringimpl.java:1610)     @ org.apache.felix.framework.bundlewiringimpl.access$200(bundlewiringimpl.java:80)     @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.loadclass(bundlewiringimpl.java:2018)     @ java.lang.classloader.loadclass(classloader.java:357)     ... 30 more java.lang.noclassdeffounderror: org/osgi/framework/bundleactivator 

here lb output after that,

g! lb                                                                                                                                                                                                                    10:19:40 start level 1    id|state      |level|name     0|active     |    0|system bundle (5.6.8)|5.6.8     1|active     |    1|jansi (1.16.0)|1.16.0     2|active     |    1|jline bundle (3.3.0)|3.3.0     3|active     |    1|apache felix bundle repository (2.0.10)|2.0.10     4|active     |    1|apache felix gogo command (1.0.2)|1.0.2     5|active     |    1|apache felix gogo jline shell (1.0.6)|1.0.6     6|active     |    1|apache felix gogo runtime (1.0.6)|1.0.6     7|active     |    1|service listener example (1.0.0)|1.0.0     8|active     |    1|english dictionary (1.0.0)|1.0.0    11|resolved   |    1|french dictionary (1.0.0)|1.0.0 

you have newline between 2 imported packages:

import-package: org.osgi.framework,  tutorial.example2.service 

can try put both on same line:

import-package: org.osgi.framework, tutorial.example2.service 

i guess in current manifest import-package ignored syntax invalid. bundle resolves fine not import packages. when activator run can not find external classes.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -