apache-felix

How do I access a file inside an OSGi bundle?

对着背影说爱祢 提交于 2019-12-05 15:27:11
问题 I am new to OSGi and created an OSGi-bundle which I run in the Apache Felix OSGi-container. There is a file resource contained in the bundle, which I need to pass to a method as a java.io.File . To instantiate a File-object, either an URI in the "file"-scheme or the path as string is necessary. How do I retrieve any of those in a clean way? I tried using the context.getBundle().getResource("/myfile") (where context is of type org.osgi.framework.BundleContext ) which returns the URI bundle://6

Where are the Configurations made in OSGi Console saved?

折月煮酒 提交于 2019-12-04 12:56:10
When we update any configuration for a component in the Configurations tab in the Apache Felix Web OSGi Console, where are these configuration settings saved? This is with respect to AEM 6.0 or above. The manually saved configuration settings are stored in the the crx-quickstart/launchpad/config directory (in your AEM installation folder in the local file system) and, on top of that, as .config files in the Content Respository at /apps/system/config . For example, if you're looking for the configuration of com.example.MyComponent , you can find it as a text file in crx-quickstart/launchpad

Unresolved JavaFX packages in OSGi Felix Application

こ雲淡風輕ζ 提交于 2019-12-04 10:43:39
I develop a rich application based on JavaFX and the OSGi Felix container. When my JavaFX is started, an org.osgi.framework.BundleException is thrown indicating that the framwork could not wire my JavaFX packages : ERROR: Bundle app-impl-bundle [3] Error starting eclipse-project:T:\workspace\fast-osgi\app-impl-bundle\ (org.osgi.framework.BundleException: Unresolved constraint in bundle app-impl-bundle [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (&(osgi.wiring.package=javafx.stage)(version>=2.2.0))) Here my MANIFEST.MF file : Manifest-Version: 1.0 Bundle

Scala in OSGI container?

纵饮孤独 提交于 2019-12-04 07:31:43
问题 How can I code my bundle in Scala and then deploy it into OSGI container? Do I compile it into "java" first or can i deploy scala straight into OSGI and use some kind of bundles to recognize it? Any pointers would be great. Currently I am using Apache Felix as my osgi-container, but just a simple explanation of generic concepts would suffice to get me started. 回答1: Thanks to everyone for the answers, you led me to the solution! I will describe it here in a little simpler terms for a wider

Unresolved constraint in bundle, missing requirement osgi.wiring.package

断了今生、忘了曾经 提交于 2019-12-04 06:38:14
I am having a project using OSGi-(felix), SpringDM, hibernate, maven. when I installed bundle, it is ok, the output when I run bundle id is: LastModified 1384619994484 Headers [Manifest-Version=1.0, Bundle-Vendor=NguyenVinhLinh, Bnd-LastModified=1384619954778, Tool=Bnd-2.1.0.20130426-122213, Bundle-Name=DrugManager, Built-By=nguyenvinhlinh, Import-Package=org.hibernate,org.hibernate.classic,org.hibernate.criterion,org.springframework.beans.factory;version="[2.5,3)",org.springframework.core.io;version="[2.5,3)",org.springframework.transaction.annotation;version="[2.5,3)", Bundle-SymbolicName

How handle different logging solutions in OSGi (Apache Felix)

与世无争的帅哥 提交于 2019-12-04 04:03:39
问题 In OSGi there is a separation between the logging frontend and the actual output. So, by using the LogService , this doesnt mean that anything is written to the console for example. This is what a LogReaderService is responsible for. In my current runtime, I am addind org.apache.felix.log which brings a LogReaderService-Implementation which should take care of the output. But I still dont see anything on the console...despite a lot of other stuff from other bundles. In the next step I created

How do I access a file inside an OSGi bundle?

蓝咒 提交于 2019-12-03 23:41:49
I am new to OSGi and created an OSGi-bundle which I run in the Apache Felix OSGi-container. There is a file resource contained in the bundle, which I need to pass to a method as a java.io.File . To instantiate a File-object, either an URI in the "file"-scheme or the path as string is necessary. How do I retrieve any of those in a clean way? I tried using the context.getBundle().getResource("/myfile") (where context is of type org.osgi.framework.BundleContext ) which returns the URI bundle://6.0:0/myfile . But this URI can't be converted to a File-instance using the File(URI uri) constructor

Creating a complete OSGi application with Felix & Maven

回眸只為那壹抹淺笑 提交于 2019-12-03 17:20:25
问题 I have a set of OSGi bundles being built using Maven and I was wondering if there is a Maven plugin available that allows me to do the following: Specify the set of bundles to include in a distribution and/or specify a single bundle and have the dependencies resolved. Build a complete distribution of the framework. What I mean is a single zip file containing all the bundles needed, plus the correct directory structure for felix so that the user can simply unzip the file and type "java -jar

Looking for basic example of using Apache Felix in dynamic loading of Jar file and instancing a class at runtime in Java

丶灬走出姿态 提交于 2019-12-03 15:34:21
I tried implementing my own class loader based on some examples. However, I think it is not working as expected ( unable to reload Jar file etc. I see few references of recommending using OSGI or Apache Felix for handling Jar file loading. Is there any examples of loading Jar, instancing a class from the Jar? More details on what I am trying to accomplish..I have a Java command line application that essentially continuously runs. I want it to be able to reference JAR files dynamically at runtime and at run-time instance a class in these jars. These jars may contain 1 or more supporting classes

Sharing a configuration file between OSGi bundles in Apache Servicemix 4?

依然范特西╮ 提交于 2019-12-03 14:09:10
问题 Has anyone been able to successfully share configuration between two or more bundles in SMX4? What I'm looking for is this: Have a single file in $SMX_HOME/etc/myconfiguration.cfg Have this configuration be "available" to be injected into my bundles via the OSGi Configuration Admin using Spring dm, i.e. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:osgix="http://www