apache-felix

Disabling Cache in Apache Felix

你离开我真会死。 提交于 2019-12-23 09:37:27
问题 i'm trying to follow the instructions in this thread (http://osdir.com/ml/dev-felix-apache/2009-05/msg00051.html) to disable file system bundle cache in felix. I couldn not find a concrete example online. Can somebody help me with this? Is this really working? Thanks in advance. Klaus. 回答1: It is not possible to disable the bundle cache, it is required by the framework. You can configure it to be cleaned each startup (org.osgi.framework.storage.clean) or you can try to use the approach

Apache Felix File Install jar from deploy folder

送分小仙女□ 提交于 2019-12-23 04:53:40
问题 I am trying to use Apache Felix File Install with an embedded version of Felix. The basic idea is simple, I have a jar application file that can be launched using standard java -jar app.jar and the application will startup Apache Felix framework and then look in a hot deploy folder installing, updating and removing the OSGi bundles that are in/placed/updated/removed from that folder at runtime. I currently have managed to create the ability to startup the embedded Felix and I can deploy

Using Service Component Runtime

落花浮王杯 提交于 2019-12-23 01:51:34
问题 I goal is to remove dependencies on OSGi from my bundles. I use felix (v 4.2.1) as impl and run it embeddable. I install org.apache.felix.scr (v. 1.6.2) bundle to have Service Component Runtime support. But when I run ServiceReference ref = bundleContext().getServiceReference(ScrService.class.getName()); ScrService s = (ScrService) bundleContext().getService(ref); I get ClassCastException: org.apache.felix.scr.impl.ComponentRegistry cannot be cast to org.apache.felix.scr.ScrService . Okay. I

Dependency chain conflicts for Hibernate and Apache Felix

删除回忆录丶 提交于 2019-12-22 11:37:39
问题 I understand the concept of OSGi complaining about multiple dependency chains - a package is available more than once and when the importing bundle doesn't specify exactly which version it needs, so the OSGi container can run into the trouble of not knowing what to provide. Unfortunately I ran into such a problem this week, but both involved bundles are third party bundles, so I can't really influence their imports and exports. Here are the two error messages I get: org.osgi.framework

OSGi: Having the same Package path in two different Bundles

断了今生、忘了曾经 提交于 2019-12-22 08:55:28
问题 I got a bundle1 that has the following packages: com.anderson.servlet.osgi (exported) com.anderson.servlet com.anderson.util (exported) and a second one, bundle2 , that looks like this: com.anderson.jetty com.anderson.servlet.osgi and I also import com.anderson.servlet.osgi from bundle1 . Is it possible to merge both packages in bundle2 ? 回答1: No. If you import a package, that takes precedence over a private package with the same name that you may happen to have inside your bundle. Why not

Embed thirdparty JAR using BND

南楼画角 提交于 2019-12-21 04:32:10
问题 I have an OSGi bundle that is built using ANT and the classic BND tool. My bundle uses a library (JAR) internally, which is not available as a bundle within my OSGi container (Apache Felix). So, I am trying to embed it within my bundle , for access at runtime. How can I embed such a library/JAR using ANT+BND? (Note : I cannot use MAVEN, using which this could have been a lot easier) 回答1: You need two instructions in your bnd descriptor. First use Include-Resource to include the target JAR

What do these OSGi commands really do?

霸气de小男生 提交于 2019-12-20 20:19:27
问题 Using Felix / Equinox, what do the following do under the hood? osgi:install osgi:refresh osgi:resolve osgi:restart osgi:update Is there a state-machine diagram or more concise documentation somewhere? 回答1: The best documentation for this is the OSGi Core Specification. The section and page numbers below refer to Release 4.3 (April 2011) of the spec. osgi:install means install a bundle from a file or stream, and it maps to the BundleContext.installBundle method in the API. Refer to section 4

Problems with maven built OSGi including dependencies

谁说我不能喝 提交于 2019-12-20 20:19:12
问题 I'm currently starting with OSGi, iPOJO and iPOJO Annotations and trying to build a simple component to be deployed in Felix. Unfortunately, I'm stumbling over various problems which take me hours to solve or which I cannot even solve after wasting hours, like the following: I want to use an existing library in my OSGi bundle which we build using Maven. The library is currently not "OSGI-ified" and we are not planning to do so in the medium term. Because of that, I want to include this

How to make Pax logging to use the loggback config instead of the standard log4j properties like syntax

心已入冬 提交于 2019-12-20 06:05:32
问题 I have some services in tomcat and trying to move to apache karaf. I have a existing service which uses logback for logging configuration. I tried to make same configuration in osgi, but could not achieve. Any please let me know what could be the problem? org.ops4j.pax.logging.cfg org.ops4j.pax.logging.logback.config.file=${karaf.home}/etc/logback.xml logback.xml is available at ${karaf.home}/etc/ --. Apache Karaf version : 3.0 , pax logging 1.7.1 which is packaged with karaf from build.

OSGi bundles won't start - Unable to resolve sun.reflect.generics.reflectiveObjects

ぃ、小莉子 提交于 2019-12-20 02:32:38
问题 After seemingly irrelevant changes in the code of my AEM project, my bundle fails to resolve. Upon inspecting the logs, I can see the following errors appearing. 22.04.2015 11:00:18.650 *ERROR* [qtp1266495948-35] org.apache.felix.http.jetty %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Unresolved constraint in bundle my-bundle ... [caused by: Unable to resolve 401.121: missing requirement [401.121] osgi.wiring.package; (osgi.wiring.package=sun.reflect.generics