osgi-bundle

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

Karaf stops unexpectedly

限于喜欢 提交于 2019-12-12 02:37:40
问题 After upgrading Karaf from 2.2.11 to 4.0.3 with log4j2 support and running load tests of our Karaf based application, Karaf unexpectedly starts shutdown process. We increased most of memory options but it did not help. No info in logs - just "Stopping blueprint extender" and "Unregistering bundles...". Above these messages there was debug info from my bundles. In manifest files of our bundles old OSGI container is used (org.osgi.framework;version="1.3.0"). This occurs for single threaded

type org.osgi.util.tracker.ServiceTrackerCustomizer does not take parameters

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:28:15
问题 I'm working on osgi application which uses com.ibm.ws.admin.client_8.5.0.jar because I need to use WebSphere with JMX. When I import as dependency this jar I get error in bundle activators: public abstract class AbstractServiceTracker implements ServiceTrackerCustomizer<Object, Object> { ... private ServiceTracker<Object, Object> tracker = new ServiceTracker<>(bc, bc.createFilter(builder.toString()), this); I get error in Netbeans type ServiceTrackerCustomizer does not take parameters and

Using an external java library in OSGI bundle

余生颓废 提交于 2019-12-12 02:27:08
问题 I want to use this java library [1]enj-library in my OSGI bundle that will be executed under KURA eclipse platform. I compiled the library as jar and then I created a new plugin project under eclipse "Plug-in from existing JAR archive" then I tried to add it to my bundle, but it did not work: 1.I tried to import the bundle and I verified that the version is correct in both manifest files in the import and the export, but I gopt this error: org.osgi.framework.BundleException: The bundle "org

OSGI container identification Equinox / knopflerfish and relation ship between equinox osgi jar and core osgi jar

纵饮孤独 提交于 2019-12-11 23:50:15
问题 Question 1:- I am working on a project which heavily uses OSGI. I am a newbee to OSGI. In my project I see JARS for both equinox and knopflerfish / and or knopflerfish bundles. Question2:- How do I determine among Equinox and Knoplerfish, which container does the OSGI use in my project? I assume OSGI can not use both the containers at a time. Question 3:- This link mentions Equinox framework requires org.eclipse.osgi_<version>.jar to implement OSGI core. So does this mean it does not require

Running my eclipse plugin end up with ClassNotFoundException

◇◆丶佛笑我妖孽 提交于 2019-12-11 20:33:02
问题 I am trying to develop an eclipse plugin that adds an action to the right click menu. I have created a java project with plugin.xml, and added the related java class that invokes an action on java files(ActionDelegate). When i run this code as "eclipse application", the class is being invoked and everything works as i expected. The problem is when i convert this project to "plug-in project" via eclipse in order to create plug-in, and run it again as "eclipse application", then i get

OSGI Bundle using Android API is showing “java.lang.RuntimeException: Stub! at android.util.Log.d”

安稳与你 提交于 2019-12-11 19:34:25
问题 In my eclipse plugin project, I am trying to use the Android API. I am only showing a message on the LogCat. In addition to adding Android.jar to my class path, I prepared Android.jar as a bundle by follwing this link. So I did the following: 1- Writing the MANIFEST.txt which contains the following: Manifest-Version: 1.0 Created-By: myself Bundle-ManifestVersion: 2 Bundle-Name: android Bundle-Description: Package android in an OSGi bundle Bundle-Version: 4.4.0 Bundle-ClassPath: .,android.jar

Optional bundle resolution

天涯浪子 提交于 2019-12-11 12:18:11
问题 I'm new in OSGi. I wrote JIRA plugin which is Apache Felix Bundle. My bundle uses Sprring Framework RestTemplate and Jackson XML for a simple REST API call. So I use other bundle (available on OSGi containter) : Apache ServiceMix :: Bundles :: spring-web which has <Import-Package> set to com.fasterxml.jackson.*; version="[2,3)";resolution:="optional" I installed jackson-databind, jackson-core and jackson-annotations (all in version 2.6.5) on OSGi container to provide missing, optional

Mock private field being initialized by OSGI Felix container

独自空忆成欢 提交于 2019-12-11 09:48:26
问题 I'm trying to mock a private field in my class which is being initialized by OSGI container in which my app is running. I'm putting a sample code for reference, any clue on this please: import org.apache.felix.scr.annotations.* @Component (name = "MyServiceImpl ", ds = true, immediate = true) @Service public class MyServiceImpl extends MyBasee implements MyService { @Reference (name = "MyOtherService", bind = "bind", unbind = "unbind", policy = ReferencePolicy.STATIC) private MyOtherService

OpenSAML3 resource not found 'default-config.xml' in OSGi container

心不动则不痛 提交于 2019-12-11 06:18:57
问题 I'm trying to upgrade to OpenSAML 3 in an OSGi bundle running on Apache Karaf (4.0.5) using opensaml servicemix bundle ( org.apache.servicemix.bundles:org.apache.servicemix.bundles.opensaml:jar:3.2.0_1 ). A test that parses the SAML is working so I think I'm on the right track. However, if I install the bundle on Karaf I get a "resource not found" error when it's trying to load default-config.xml . 2016-06-21 16:29:10,477 | INFO | ool-120-thread-1 | InitializationService | 388 - org.apache