apache-felix

Felix how to use FrameworkWiring.getDependencyClosure

谁说我不能喝 提交于 2019-12-13 00:40:53
问题 I am trying to get depends for each bundle. In this SO post I was advised to use FrameworkWiring.getDependencyClosure , but I can't understand how to initialize class, FrameworkWiring.getDependencyClosure - it's interface. Is there any implementations of this interface in felix? And second question: I have found BundleWiringImpl getRequirements(null); but I can't initialize BundleWiringImpl testObject = new BundleWiringImpl(); NetBeans show error: constructor BundleWiringImpl in class

Where to find and install org.osgi.framework package?

流过昼夜 提交于 2019-12-12 21:08:50
问题 I am trying to follow this tutorial: apache felix tutorial #1 But I don't understand the directory structure. Where do I place the Activator.java file? Where, relative to the Activator.java file do I place the MANIFEST.MF? In this tutorial when I try to compile the Activator.java file, I get errors that org.osgi.framework does not exist. Where can I get the org.osgi.framework package and where should it be installed? How does the javac build command know how to find the org.osgi.framework

OSGi bundle compile error

我的未来我决定 提交于 2019-12-12 03:59:23
问题 When I build my bundle, maven throws the exception: [ERROR] Bundle com.onboard:com.onboard.service.security:bundle:3.0.0-SNAPSHOT : Exporting packages that are not on the Bundle-Classpath[Jar:dot]: [about_files, XXX] [ERROR] Error(s) found in bundle configuration I use maven-bundle-plugin to build my code: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.3.7</version> <extensions>true</extensions> <configuration> <manifestLocation>src/main

Exception logged when using custom css in JavaFX in Felix OSGI

女生的网名这么多〃 提交于 2019-12-12 03:35:26
问题 I'm getting the exception below logged to stderr when trying to use my own custom css in JavaFX 2.2 (from JDK 7 update 11). It's funny because the css is actually found and used in my application so the only thing wrong is the exception in the logs. I also load up other resources this way (images, fonts etc) and there are no exceptions logged in these cases. I'm loading the css like this: val cssResource = getClass.getResource("/com/openaf/browser/gui/resources/openaf.css").toExternalForm

How to exclude META-INF files from bundle?

空扰寡人 提交于 2019-12-12 03:15:56
问题 How can I exclude some META-INF files when building a bundled jar using the maven apache felix plugin? Here's my felix config <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.4.0</version> <extensions>true</extensions> <configuration> <instructions> <!-- Embed all dependencies --> <Embed-Transitive>true</Embed-Transitive> <Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency> </instructions> </configuration> </plugin> I'm

get all implementations of an api

淺唱寂寞╮ 提交于 2019-12-12 03:03:47
问题 I have written an API Bundle and some implementing services. Now i want to use them as plugins, so first of all i need a list of all the services i have. I'm starting the api like this: Framework m_fwk = new org.apache.felix.framework.FrameworkFactory().newFramework(null); m_fwk.init(); AutoProcessor.process(null, m_fwk.getBundleContext()); m_fwk.start(); Bundle api = m_fwk.getBundleContext().installBundle( "file:/foo/bar/api/target/api-1.0.jar"); api.start(); So now the API is loaded. Now i

How can I read factory configurations for my OSGI instance

◇◆丶佛笑我妖孽 提交于 2019-12-12 02:44:00
问题 I have a OSGi Transformer component which is instantiated by sling. In my OSGi component I have the following annotations : @Component(configurationFactory = true, metatype = true, policy = ConfigurationPolicy.REQUIRE, label = "CDN Link Rewriter", description = "Rewrites links to all static files to use configurable CDN") @Service(value = TransformerFactory.class) public class StaticLinkTransformer implements Transformer, TransformerFactory I have some properties which I have annotated as

Apache felix and org.osgi for weld cdi - constraint violation

♀尐吖头ヾ 提交于 2019-12-12 01:25:08
问题 I want to do the following solution:Apache Felix + Weld for Java SE. For that I want to run one of examples from weld archive - weld-osgi-paint. For now I have the following bunle list: cdi-api.jar ops4j-base-lang-1.5.0.jar pax-swissbox-core-1.8.0.jar weld-osgi-paint-core.jar org.apache.felix.scr-1.8.2.jar pax-swissbox-lifecycle-1.8.0.jar weld-osgi-paint-square.jar javax.annotation-api-1.2.jar org.apache.servicemix.bundles.javax-inject-1_2.jar pax-swissbox-tracker-1.8.0.jar weld-osgi-paint

How can i add Declarative Services support to embedded felix in Netbeans?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 00:44:33
问题 In netbeans, embedded felix does not support DS.How can we add Felix Service Component Runtime to embedded felix in netbeans. 回答1: Declarative Services is implemented by an ordinary bundle, called SCR (Service Component Runtime). Simply install that bundle! Look for SCR on the Felix downloads page: http://felix.apache.org/downloads.cgi 来源: https://stackoverflow.com/questions/19152649/how-can-i-add-declarative-services-support-to-embedded-felix-in-netbeans

Change Bundle level in felix?

寵の児 提交于 2019-12-11 23:52:57
问题 I know how to set an initial bundle level, for just to be deployed bundle: bundlelevel -i 5 But how do I change the level of an existing bundle? Help for bundlelevel says: bundlelevel - set bundle start level or initial bundle start level scope: felix flags: -i, --setinitial set the initial bundle start level -s, --setlevel set the bundle's start level parameters: int target level Bundle[] target identifiers bundlelevel - query bundle start level scope: felix parameters: Bundle bundle to