osgi

How to deploy Osgi Compendium Services in Karaf 4?

空扰寡人 提交于 2020-01-07 03:05:06
问题 I got this error when I tried to deploy a bundle that uses Compendium service: Error executing command: Unable to resolve root: missing requirement [root] ... osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.service.component)(version>=1.1.0) (!(version>=2.0.0)))"]] My bundle is configured so it uses: <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.compendium</artifactId> <version>5.0.0</version> </dependency> And acording to karaf 4 depts documenation. Osgi

java.lang.LinkageError while using JGit and Jsch for Eclipse plugin development

狂风中的少年 提交于 2020-01-06 09:05:40
问题 I am trying to develop an Eclipse plugin. This plugin uses jgit to accecc git repositories over ssh with ubuntu username and password. (Clone git repository over ssh with username and password by Java) Using jgit in this with NetbBeans works just fine. Without a problem it can clone, commit and push projects. However when I move the same code fragment into Eclipse jsch of jgit plugin and the jsch I've added to the project conflicts. If I remove the one I've I added then I cannot compile the

Apache Karaf, can't inject entity manager

帅比萌擦擦* 提交于 2020-01-06 03:39:08
问题 I want to use entity manager from container, but when I try to access it I get java.lang.IllegalStateException: Need active coordination persistence.xml <persistence-unit name="data-point" transaction-type="JTA"> <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=dvdrental)</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL82Dialect"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate

how do i call jsf template from different xhtml (another bundle) in OSGi

荒凉一梦 提交于 2020-01-06 02:36:11
问题 I want to call xhtml template from another xhtml but this xhtml is in different project(different jar). I'm using OSGi with karaf. This is my master.xhtml ; <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:ui="http://java

Dynamically setting target property in OSGi Reference annotatation

拜拜、爱过 提交于 2020-01-06 02:32:05
问题 After reading an article on Reference target (and corresponding properties), I still don't understand how to retrieve a service, when target is set at runtime (typically target and properties are set at compile time and evaluated by SCR at runtime). Let's say there are three service implementations defining @Property(name="type", value="csv") , @Property(name="type", value="xls") and @Property(name="type", value="pdf") , respectively. And one consumer with: //@Reference(target="(type=%runtime

How can single instance of an OSGI factory configuration be read from Java in CQ

☆樱花仙子☆ 提交于 2020-01-05 10:25:44
问题 I need to read the specific child instance of an OSGi factory configuration. I believe it can't be accessed with the Service PID of the factory configuration so there should be a way to reference the child configuration via Java. Can anyone please help in providing a sample code or a way to do this? 回答1: Below is an example. "WSConnection" is an OSGI config where we can configure multiple configs. and the Helper class will help you pick the one you wanted. "configuration.id" is one of the

OSGi java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext

非 Y 不嫁゛ 提交于 2020-01-05 10:05:35
问题 I'm new with OSGi and I'm having trouble trying to run an example of this library: https://github.com/jitsi/libjitsi java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.jitsi.service.libjitsi.LibJitsi.start(LibJitsi.java:247) at org.jitsi.service

error when deploying jersey/helloworld-osgi-webapp on glassfish 3.1.2.2

偶尔善良 提交于 2020-01-05 07:49:09
问题 When trying to deploy the sample jersey war bundle code (helloworld-osgi-webapp on git: https://github.com/jersey/jersey-1.x/tree/master/jersey/samples/helloworld-osgi-webapp) on Glassfish 3.1.2.2, I am getting the following osgi error: remote failure: Error occurred during deployment: Exception while loading the app: org.osgi.framework.BundleException: Unresolved constraint in bundle war-bundle [344]: Unable to resolve 344.0: missing requirement [344.0] osgi.wiring.package; (&(osgi.wiring

AEM 6.3 - Creating Event handler using OSGi R6 annotations

别等时光非礼了梦想. 提交于 2020-01-05 05:40:29
问题 I have created an Event handler by following https://github.com/nateyolles/aem-osgi-annotation-demo/blob/master/core/src/main/java/com/nateyolles/aem/osgiannotationdemo/core/listeners/SampleOsgiResourceListener.java and it works fine. However, I get the warning "The field SlingConstants.TOPIC_RESOURCE_ADDED is deprecated". I did some searching and found this thread :https://forums.adobe.com/thread/2325819 Here are the challenges that I am facing: 1) I want to create a separate configuration

Does OpenJPA work with OSGi

给你一囗甜甜゛ 提交于 2020-01-05 03:51:09
问题 The software we work on is fully on OSGi. So we need JPA implementation which can WELL work with OSGI. Currently we use eclipselink (2.6.3)+eclipse gemini. The problem is that according to specs (jpa or osgi-ee ?) entities are not supported to be in different bundles. However, the developer of gemini said that he also doesn't understand this issue with specs and finds it strange that's why he allowed using entities from different bundles, although no special work was done. So eclipselink