osgi

OSGi component configurable via Apache Felix

ぐ巨炮叔叔 提交于 2019-12-10 18:34:37
问题 I'm a complete newb at this so I apologize in advance. I'm trying to create an OSGi component that simply shows a hello world message and is configurable via the input from felix. Then spits it out on a jsp page. I'm using scr annotations to help do this. Here is my java code package com.training.cq5.trainingApp; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Properties; import org.apache.felix.scr

OSGI service JPA PersistenceContext not injected

不打扰是莪最后的温柔 提交于 2019-12-10 18:10:09
问题 I have a core library that has an interface that I want to expose as an OSGI service in Fuse ESB (Apache ServiceMix and Karaf). The goal is to allow other bundles to use it. The service uses JPA (OpenJPA) and Spring. The following is the interface: public interface PatientService { public Patient find(Integer id); } and the class: @Repository public class PatientServiceJpaImpl implements PatientService { @PersistenceContext(unitName="psu") private EntityManager entityManager; @Override public

How to dynamically load Java classes at Runtime in OSGI framework?

夙愿已清 提交于 2019-12-10 16:21:34
问题 We are performing a POC in our project, where in we send SOAP based request and correspondingly get a SOAP response from a web service. We aim to leverage webservices template (client side API) provided by spring framework in our application. As per our architecture, we create an OSGI compliant bundle (for our code that uses webservices template API to interact with the web service) which is then deployed into the Apache Felix container. We have also installed all the dependent OSGI compliant

java.lang.NoClassDefFoundError on OSGi

孤者浪人 提交于 2019-12-10 13:19:10
问题 I have a bundle, with an activator declared. This activator create a JFrame and show it. Running on Eclipse as Plugin project it works fine. When I put on Felix it doesn't work anymore. It shows: java.lang.NoClassDefFoundError: com/griep/ui/MainFrame But MainFrame is located in the same bundle the activator is, as a public class, of course. I don't understand why the classloader isn't finding the class. Anyone knows what is happening? 回答1: Make sure you import the javax.swing package into

Transitive dependencies not resolved with maven dependency and tycho pomConsider option

China☆狼群 提交于 2019-12-10 13:16:47
问题 I try to create an eclipse plugin using OSGI dependencies from two repositories, one with maven dependencies, and one with p2 dependencies : <repositories> <repository> <snapshots> <enabled>true</enabled> </snapshots> <id>bintray-anrgenstar-genstar-packages</id> <name>bintray</name> <url>http://dl.bintray.com/anrgenstar/genstar-packages</url> </repository> </repositories> <repository> <id>gama</id> <name>GAMA Snapshots</name> <url>http://gama.unthinkingdepths.fr</url> <layout>p2</layout>

is there a way to view registered services in an OSGi application?

久未见 提交于 2019-12-10 12:32:51
问题 I have an OSGi application running Equinox. I'd like to see the services that are provided by the application. How can I do this? 回答1: It depends whether you mean interactively, using an OSGi shell, or programmatically from your application. Interactively You can use the Equinox console. See 'services'. To only see the services you have deployed you need to use an LDAP filter. Here's an example: (objectClass=my.package.name.*) Also see @Neil Bartlett's answer which might be easier as you can

Install dependency jar file in apache-karaf-2.3.10

被刻印的时光 ゝ 提交于 2019-12-10 12:20:27
问题 I am trying to deploy an bundle in Apache karaf-2.3.10 container which inturn has jar file dependencies. After copying the dependency jar file to deploy dirctory of Apache-Karaf dependency issue got resolved. How to install the normal jar through command line. I tried the below command osgi:install -s 'wrap:mvn:<path to the jar file/test.jar>' which shows Error executing command: Error installing bundles: My bundle has lot of dependency jar files. Do i need to copy all the jar files to deploy

Grails solution for OSGI-like live modularity?

纵饮孤独 提交于 2019-12-10 12:07:35
问题 I'm working on a grails based multipurpose billing system which offers different kinds of payment gateways, server modules and notifications modules to it's users. Currently all modules are implemented as grails services bundled with the app, but I'd like to let people create their own modules, but without having to share my source code with them. So basically I need some grails application aware (I want to be able to work with grails domains and other grails specific objects in an injected

Metro + Jetty + OSGi = pain

烈酒焚心 提交于 2019-12-10 12:00:03
问题 I am trying to swap out Sun's HTTPServer for the much better Jetty server, within an OSGi bundle, running on Equinox. I have tried this: System.setProperty("com.sun.net.httpserver.HttpServerProvider","org.mortbay.jetty.j2se6.JettyHttpServerProvider"); but when endpoint.publish(url) is called, and the server is spawned, it complains of a ClassNotFoundException for org.mortbay.jetty.j2se6.JettyHttpServerProvider. However, the correct jars are in the bundle, and indeed in the Activator I can

How to support osgi in android gradle plugin environment?

冷暖自知 提交于 2019-12-10 11:19:33
问题 I want to use apk as an osgi bundle, and then load it in a host application. Now, it works ok. But I must manually do these things before push the osgi bundle to phone: Open osgi bundle apk file with WinRAR. Drag the built classes(in extension-a\build\intermediates\classes\debug\com) to the bundle file's root directory. Drag the modified MANIFEST.MF (including OSGI config info) to the bundle file's META-INFO/MANIFEST.MF . Sign the bundle apk at last. I want to know how to write some gradle