osgi

How to modify the Eclipse Run Configuration classpath for an OSGi application?

一笑奈何 提交于 2019-12-25 05:14:24
问题 At Eclipse Run/Debug Configurations there is a 'Classpath' tab when it is a 'Java Application' configuration, but when it is an 'OSGi Framework' it doesn't. How can I set the classpath for an OSGi application? 回答1: I've found it by myself. Settings tab > Bootstrap entries From: Eclipse documentation Bootstrap Entries By default, the only entry on the launch configuration classpath is the ${target_home}/plugins/org.eclipse.equinox.launcher JAR. The ${target_home}/plugins/org.eclipse.equinox

How to modify the Eclipse Run Configuration classpath for an OSGi application?

霸气de小男生 提交于 2019-12-25 05:14:01
问题 At Eclipse Run/Debug Configurations there is a 'Classpath' tab when it is a 'Java Application' configuration, but when it is an 'OSGi Framework' it doesn't. How can I set the classpath for an OSGi application? 回答1: I've found it by myself. Settings tab > Bootstrap entries From: Eclipse documentation Bootstrap Entries By default, the only entry on the launch configuration classpath is the ${target_home}/plugins/org.eclipse.equinox.launcher JAR. The ${target_home}/plugins/org.eclipse.equinox

Android embedded Felix missing requirement osgi.ee

对着背影说爱祢 提交于 2019-12-25 04:28:10
问题 I'm trying to convince an embedded Apache Felix on Android to start an external bundle. So far I have managed to embed the felix.jar into its own APK and run it as an activity. Within this activity I'm able to install outside bundles from jar files. Unfortunately whenever I try to move on and start one of these bundles I get the following error: Encountered exception when starting bundle: Unresolved constraint in bundle com.example.hellofelix [1]: Unable to resolve 1.0: missing requirement [1

Android embedded Felix missing requirement osgi.ee

血红的双手。 提交于 2019-12-25 04:28:08
问题 I'm trying to convince an embedded Apache Felix on Android to start an external bundle. So far I have managed to embed the felix.jar into its own APK and run it as an activity. Within this activity I'm able to install outside bundles from jar files. Unfortunately whenever I try to move on and start one of these bundles I get the following error: Encountered exception when starting bundle: Unresolved constraint in bundle com.example.hellofelix [1]: Unable to resolve 1.0: missing requirement [1

mangen adds 'Bundle-ManifestVersion: 1' to manifest, but felix doesn't seem to accept value 1

隐身守侯 提交于 2019-12-25 04:07:24
问题 I've used 'Mangen' to process my jar, which works but it adds the next line to the manifest Bundle-ManifestVersion: 1 after which Felix 1.8.0 complains with -> install file:D:/bundles/osgi_ds_1.jar.new.jar org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value: 1 at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:56) If I change the version manually to 2, Felix does install without error. But even if the manifest already contained

Start / Stop Fragment Programmatically

◇◆丶佛笑我妖孽 提交于 2019-12-25 03:43:11
问题 I want to implement a feature toggle in OSGI, which means I want to start and stop bundles programmatically. For plug-ins that's really easy: Bundle plugin = //... plugin.start(); plugin.stop(); For fragments it's not so easy. Stopping does not work at all, and if I use uninstall() the fragment is gone for good, and I'm not able to install it again, since I don't know the correct location for BundleContext#installBundle(...) (and looking at Bundle#getLocation() , neither does the fragment

OSGI bundle is unable to start

人走茶凉 提交于 2019-12-25 03:07:51
问题 I have an OSGI bundle which gets to the RESOLVED state, but never reaches the ACTIVE state. When I run my application, this is the stacktrace I am obtaining: http://tny.cz/fa949f16 Afterwards, when I try to start the bundle explicitly through the OSGI console, I get this error: start 53 gogo: BundleException: The activator rsy.home.mac.sm.schedule.service.win.WinServiceActivator for bundle rsy.home.mac.sm.schedule.service.win is invalid Notice that in the end of the stacktrace ouput, there's

JBOSS 7 - Osgi Bundles not present in JNDI TREE

我的梦境 提交于 2019-12-25 01:55:48
问题 I have a bundle in JBOSS7 Bundle Repository. I want to lookup it from a WAR class throw JNDI, but in my JBOSS7.0.1.Final AS there is any trace of osgi in JNDI tree. In JNDI tree I found only "java:" and "java:jboss", I think that when I deploy a bundle the AS should add the "osgi:" leaf to the tree. Why not? Osgi Alliance specific says that when an osgi bundle is deployed it should be reachable throw JNDI... Some ideas? Thanks a lot! 回答1: You are right, this part of the OSGi-JNDI spec is not

implementing component factory for multiple class with same names and retrieving through property/filter values

泪湿孤枕 提交于 2019-12-25 00:38:09
问题 I am working on OSGi(Rev 4) project in which i have to use karaf registry. Either i can declare my implementation as Component or Service. ie) I can register my component/service in karaf with component factory/service Factory to produce objects of Component/Service. I am having multiple class implementations, so with Service factory i hope it is achievable with single class ie) by registering all the services with the same name with different property/filter values.While retrieving service i

Diff btw ServiceTracker, ServiceReference & ServiceReferences

此生再无相见时 提交于 2019-12-24 19:51:29
问题 I am new to OSGi and have been studying it for a while. I want to know the key differences in usage and the benefits for ServiceTracker, ServiceReference & ServiceReferences . I used an example with both ServiceTracker & ServiceReference and if the service isn't available then both return NULL . However if the service is available then both work just fine, but I couldn't observe what is the difference between two. Somewhere I read ServiceTracker is a programmatic way to acquire a reference to