osgi-bundle

How to work with frequent local snapshot bundle deployments on Karaf?

孤者浪人 提交于 2019-11-30 00:18:02
I decided to build an application on top of OSGI and Karaf - I really like this stuff. However, I'm struggling a bit with a daily deployment on my local, development machine. I mean.. I make a change and then I would like to test it on my local Karaf instance. And it can happen like couple times per hour. The way I'm doing it now is a maven build that creates a JAR bundle and then it's copied into the Karaf's deploy directory. I think that it isn't elegant at all. I was trying to find a way around (google). I read about Karaf's features but it seems that despite the fact that it is a nice

How to handle Import-Package entries which come from jars on the Bundle-Classpath?

岁酱吖の 提交于 2019-11-29 15:01:22
I have put a few jars on my Bundle-Classpath. The line below shows the entry in my pom.xml, which uses the Felix plugin to create the manigest.mf for the bundle. <Bundle-ClassPath>.,lib/com.springsource.org.h2-1.0.71.jar,lib/com.springsource.org.apache.lucene-2.3.2.jar,lib/com.springsource.org.apache.lucene.search-2.3.2.jar</Bundle-ClassPath> These jars have classes which import packages, but from what I can see, they all have a MANIFEST.MF, which has it's own (accurate) list of Import-Package statements. However, when I build my project (using Maven and the bundle plugin), it reports an error

The activator for bundle is invalid

喜夏-厌秋 提交于 2019-11-29 06:20:50
问题 I'm trying to create a simple plugin in eclipse. When I run the application, I see this error in log file: org.osgi.framework.BundleException : The activator for bundle org.x.y.Activator for bundle org.x.y is invalid. Do you have any idea about this error? 回答1: Check your build.properties section If it doesn't properly specify what's supposed to be in the final binary result, it will not work. Check the .class files are where the MANIFEST.MF says they will be. from EclipseZone, another reason

Non-osgi library usage in an osgi application

假装没事ソ 提交于 2019-11-29 02:46:25
问题 Is it possible to use a non-osgi library with an OSGi application? For an example, I'm developing a semantic based search engine, and I am using a third party Natural Language Processing library for it (http://wiki.opencog.org/w/RelEx_Dependency_Relationship_Extractor). Is it possible to interface such a library which doesn't suport OSGi, as a couple of jar files, with my OSGi application? 回答1: As it was written in previous answers you have two options if you want to use additional libraries

Loading of OSGi bundle dynamically from a file system

旧时模样 提交于 2019-11-29 02:45:12
I have a modular application which uses OSGi framework. Here I'm using org.eclipse.equinox.common_3.4.0 OSGi container. So now the application is already running with all the osgi bundles installed and active and I am displaying all the active OSGi bundles on the UI, by looping though a hash map, based on some action. Now the requirement is, while the application is already running, I want to instal a new OSGi bundle, from a file system, by giving this new bundle to the application's OSGi container so that it will start this bundle. How do I achieve this ? I have tried reading the OSGi bundle

java.util.NoSuchElementException while starting an OSGi framework programatically

一世执手 提交于 2019-11-28 14:17:53
I am trying to programatically start an OSGi framework (preferably Equinox) from Java and then load up any bundles. So I was going through this article which says how to do that. But I am getting java.util.NoSuchElementException everytime at the below line everytime ServiceLoader.load(FrameworkFactory.class).iterator().next(); Below is the code- import java.io.File; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.ServiceLoader; import java.util.logging.Logger; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org

How to handle Import-Package entries which come from jars on the Bundle-Classpath?

你离开我真会死。 提交于 2019-11-28 08:49:20
问题 I have put a few jars on my Bundle-Classpath. The line below shows the entry in my pom.xml, which uses the Felix plugin to create the manigest.mf for the bundle. <Bundle-ClassPath>.,lib/com.springsource.org.h2-1.0.71.jar,lib/com.springsource.org.apache.lucene-2.3.2.jar,lib/com.springsource.org.apache.lucene.search-2.3.2.jar</Bundle-ClassPath> These jars have classes which import packages, but from what I can see, they all have a MANIFEST.MF, which has it's own (accurate) list of Import