osgi

What are the non-osgi targets with which Apache ACE can work

北战南征 提交于 2019-12-06 17:24:32
Apache Ace documentation refers that it can do software provisioning to other types of targets "non-OSGi containers, or something completely different target". But no documentation is available regarding non-OSGi target. Can I have some examples of non-OSGi targets to which Apache Ace can do software provisioning. Also, what are the minimum requirement for a target to work with Apache ACE. Thanks Some examples of non-OSGi targets that I have seen people create are: Android applications to a mobile device, using a resource processor that could programmatically install .APK files. Windows

How can I register webservice through OSGi (karaf) API with custom trustManager

左心房为你撑大大i 提交于 2019-12-06 16:34:59
问题 I am working on software which registers WS through the call below: initiatingBundle.getBundleContext() .registerService( interfaces, serviceObject, this.convertMapToDictionary( initiatingBundle.getBundleContext(), serviceAttributes ) ); This is the help for the OSGi API: org.osgi.framework.BundleContext ServiceRegistration<?> registerService(java.lang.String[] clazzes, java.lang.Object service, java.util.Dictionary<java.lang.String,?> properties) Is there any way (example with the properties

Dependency management in OSGI bundle ServiceMix

倖福魔咒の 提交于 2019-12-06 16:03:12
Hi I am new to ServiceMix, so probably I am asking same question which might be answered but I couldn't figure out. My doubt is how do I manage compile time vs runtime dependencies when using bundle in ServiceMix OSGI. That is if I am building a .jar workable(by unit tests aleast) artifact with maven where all compile time dependencies say example(camel,spring) are handled by pom.xml dependencies and are loaded into jar as needed libs for successful build. So when I am deploying the jar in OSGI those libs(camel,spring) are already existing in maven generated jar. Now as OSGI bundles I am

NoClassDefFoundError: org/hamcrest/Matchers using PowerMock-OSGi

一个人想着一个人 提交于 2019-12-06 15:32:45
I get an NoClassDefFoundError for org.hamcrest.Matchers, when i run my Test as OSGi PlugIn test, but when i run it as plain JUnit test everthing works as expected. I am using the OSGi version of PowerMock and have all neccessary dependencies in my launch config. What i am doing wrong? It seems like the Testrunner doesnt see the class, for some reason. Edit: I created a reduced sample project and figured out that the Problem only appear when i use @PrepareForTest(XXX.class) in my class declaration. java.lang.NoClassDefFoundError: org/hamcrest/Matchers at eu.gemtec.commons.util.assertion.Assert

OSGI framework hangs when loading native library

无人久伴 提交于 2019-12-06 15:30:53
Situation: Open source OSGI framework SMILA (http://www.eclipse.org/smila/) started as Windows Service with the aid of Apache commons-daemon (http://commons.apache.org/daemon/). Trying to load a DLL via System.loadLibrary() from OSGI bundle while Manifest.mf includes Bundle-NativeCode: path/to/dll . Environment: Windows Server 2003, Java 1.6 Error: During the invocation of System.loadLibrary() the complete Java process hangs. When the service is stopped System.loadLibrary() finish and code execution goes on until the OSGI framework shut down. The error doesn’t occur on Windows Server 2008 or

OSGi: Missing requirement osgi.wiring.package

馋奶兔 提交于 2019-12-06 15:29:06
I write a project which contains 5 modules. I create them in intellij IDEA with maven, then add "OSGi" framework support to all the modules. I use maven-bundle-plugin to configure the export-package and import-package. But when I run it, there's always a error: org.osgi.framework.BundleException: Unable to resolve org.gxkl.launcher [12] (R 12.0): missing requirement [org.gxkl.launcher [12](R 12.0)] osgi.wiring.package; (osgi.wiring.package=org.gxkl.server). The launcher module contains Bundle-Activator, and the org.gxkl.server package is in the service module. I use the similar pom to

Track files changes done by eclipse cleanup programmatically

孤人 提交于 2019-12-06 15:06:26
I have written one eclipse osgi plugin that runs cleanup and formatting actions on java files present in eclipse project. Some thing like: Run batch file that has eclipse command It open's eclipse editor Loads eclipse project passed as parameter in batch command Run cleanup and formatting actions Closes eclipse Now my problem is I need to track the files that has been changed by this action. I am performing cleanup changes using cleanUpsAction that runs as thread over multiple files and forks further. It returns void. There is IResourceChangeListener which I tried as well but I am not able to

Deploy exploded bundle to Apache Felix using an Eclipse launch task

时光怂恿深爱的人放手 提交于 2019-12-06 14:55:18
I am looking for a way to (re)deploy an exploded bundle (meaning not jarred but in a folder) to a running Apache Felix OSGi container from within Eclipse, preferably using a launch task. I found this question, which has an answer that comes close but it depends on typing commands into a Gogo shell, which is not convenient for long-term development use. I'd like to use Eclipse's launch task mechanism for this, but if there are alternatives that are equally fast and convenient I am open to that as well. Now I think that if I can fire Gogo shell commands from an Eclipse launch tasks, that would

How to load all the jars from a directory dynamically?

为君一笑 提交于 2019-12-06 14:29:25
Hi I am creating a plugin which requires loading jars dynamically and accessing the classes and methods of these jars. I tried using URLClassLoader and am able to load the classes as shown below URL myJarFile = new URL("jar","","file:"+jarPath); URLClassLoader sysLoader =(URLClassLoader)ClassLoader.getSystemClassLoader(); Class sysClass = URLClassLoader.class; Method sysMethod = sysClass.getDeclaredMethod("addURL", new Class[]{URL.class}); sysMethod.setAccessible(true); sysMethod.invoke(sysLoader, new Object[]{myJarFile}); But the issue with this is that we have to load classes into

Karaf Cave vs org.apache.felix.bundlerepository

痴心易碎 提交于 2019-12-06 13:43:04
Good day. I am trying to get the benefits of OBR in my application. I took Karaf Cave (4.0.0) as OBR implementation and org.apache.felix.bundlerepository (2.0.4) as OBR client. I successfully configured the repository itself but I can't properly use it. The problem is: when I install the bundle via OBR and all its dependencies are already installed in OSGI runtime, it is installed successfully. But if some of the requirements are missing, I got an "Unsatisfied requirements" error, which is odd, since I know for sure that all the resources which resolves these requirements are present in the