osgi

Trying to build an OSGi bundle in Maven with embedded dependencies. Can't seem to exclude transitive dependencies from BND classpath

谁都会走 提交于 2019-12-05 03:27:06
Basically, my web service must be deployable as a single OSGi jar bundle. Therefore: The bundle must contain all compile and runtime maven dependencies. It must also contain all non-optional dependencies that depend on those dependencies (i.e., the transitive dependencies). I'm attempting to use the maven-bundle-plugin to accomplish this. I've used Embed-Dependency to get all my compile and runtime dependencies in the bundle, and I've used Embed-Transitive to embed all the transitive dependencies. I then figured out how to use excludeDependencies to exclude Maven dependencies from the BND

Is it possible to create JKS keystore file without a password?

若如初见. 提交于 2019-12-05 03:06:31
I'm experimenting with OSGi conditional permissions mechanism. More specifically, I'm trying to use org.osgi.service.condpermadmin.BundleSignerCondition to restrict which bundles can be started. Documentation I have states that in order to use this permission, I must specify the path to JKS keystores using org.osgi.framework.trust.repositories framework configuration property. However, the same documentation mentions that JKS mentioned in this property must not have a password. So the question is: how to create a JKS without a password? Keytool utility refuses to create JKS with blank password

Using Elasticsearch Rest High Client problem in AEM

旧巷老猫 提交于 2019-12-05 01:43:01
问题 I am trying to use Java High Level Rest Client in Adobe Experience Manager to finish project of comparison between Lucene, Solr and Elasticsearch search engines . I am having some problems with elasticsearh implementation . Here is the code: Dependency in the parent pom.xml (the same is defined in core pom.xml) <!-- Elasticseach dependencies --> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.4.0</version> <

'Platform is not supported' supported when trying to run OSGi debug target

此生再无相见时 提交于 2019-12-05 00:31:59
问题 I'm trying to run a tiny OSGi project from IntelliJ Idea. I've added the Equinox container in the OSGi configuration section in Idea. Then I added the OSGi facet to the project. Everything looks ok to this point. However as soon as I try to run the project I get into trouble. I use the 'OSGi Bundles' runner from IntelliJ Idea. There I select my project bundles and the OSGi container and run it. Here the issue starts. I always the the same error message: ___ / / / / Oops, there has been a

ScriptEngineManager and ScriptEngine can not be loaded in Karaf OSGi (Nashorn not found)

拈花ヽ惹草 提交于 2019-12-04 23:48:30
问题 I am trying to use ScriptEngineManager and ScriptEngine to execute some JavaScript code with Java. I use Java 8 I am executing this code under Karaf OSGi. The example I used works fine in a sample Java Class, but packing it in a bundle gives me this error ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider jdk.nashorn.api.scripting.NashornScriptEngineFactory not found When I look to the headers of the bundle, I see that the bundle imports javax.script, the package

How to create a working OSGI bundle for Apache POI 3.8?

时光毁灭记忆、已成空白 提交于 2019-12-04 23:36:14
问题 My goal is to create an Excel 2007 document (XLSX) in an Eclipse RCP Environment (Excel 2003 is simple). I don't want to place the POI jars inside a /lib folder , instead I want to use a working POI OSGI bundle from my target definition. All my attempts so far have failed to create a working OSGI bundle of POI 3.8. What I did so far: I merged all relevant JAR files with the Ant zip task: poi-3.8-beta3-20110606.jar poi-ooxml-3.8-beta3-20110606.jar poi-ooxml-schemas-3.8-beta3-20110606.jar poi

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

≯℡__Kan透↙ 提交于 2019-12-04 22:13:01
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 attribute) to create a webservice with custom TrustManager like below? TrustManager trustManager =

OSGi how to run mutliple instances of one service

非 Y 不嫁゛ 提交于 2019-12-04 19:48:31
Is it possible to run multiple instance of the same service in the osgi framework? More specific, I need to start multiple instances of a service, but each instance should recieve different parameters. This is because the services have similar functionality. But instead of writing a service for every variation, I want to reuse one implementing class. I've already found the registerService method in the framework api. ServiceRegistration<?> registration = bundlecontext.registerService( className, class, null); however, i seem to create only one instance of each class. Is there a workaround for

What's new in OSGi 4.2?

断了今生、忘了曾经 提交于 2019-12-04 19:23:15
问题 OSGi 4.2 has just been released which updates the 4.1 specification with a few new RFCs. So, what's particularly new with OSGi 4.2, which frameworks support 4.2 already (or are close to) and why should you target new developments against a 4.2 framework instead of a 4.1? 回答1: In most cases, a point release of OSGi (such as 4.1->4.2) doesn't really change much existing behaviour, so it's safe to say that if you have an app that depends on 4.1, it'll run on 4.2 without problem. What is new is

UnsatisfiedLinkError While Calling Native Method from OSGi Bundle

ぐ巨炮叔叔 提交于 2019-12-04 19:10:04
I have created one OSGi plugin (Bundle) using eclipse File-->New-->Other-->Plug-in Project called plugin 1. I want to use a native .so library in this plugin. I have added libtest_app_wrap1.so at the root of my plugin project. my project structure looks like below And here is the manifest file Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: JniTest Bundle-SymbolicName: JniTest Bundle-Version: 1.0.0.qualifier Bundle-Activator: jnitest.Activator Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: org.osgi.framework;version="1.3.0" Bundle-NativeCode: libtest_app_wrap1.so;