Questions tagged [karaf]

Apache Karaf is a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed. Use the apache-karaf tag. This tag is deprecated and should really be merged/removed.

Apache Karaf is a small based runtime which provides a lightweight container onto which various components and applications can be deployed.

The main features supported by Karaf are:

  • Hot deployment : Karaf supports hot deployment of OSGi bundles by monitoring files inside the [home]/deploy directory. Each time a jar is copied in this folder, it will be installed inside the runtime.
  • Dynamic configuration : Services are usually configured through the ConfigurationAdmin OSGi service. Such configuration can be defined in Karaf using property files inside the [home]/etc directory.
  • Logging System : using a centralized logging back end supported by Log4J, Karaf supports a number of different APIs
  • Provisioning : Provisioning of libraries or applications can be done through a number of different ways, by which they will be downloaded locally, installed and started.
  • Native OS integration : Karaf can be integrated into your own Operating System as a service so that the lifecycle will be bound to your Operating System.
  • Extensible Shell console : Karaf features a nice text console where you can manage the services, install new applications or libraries and manage their state. This shell is easily extensible by deploying new commands dynamically along with new features or applications.
  • Remote access : use any SSH client to connect to Karaf and issue commands in the console
  • Security framework : It provides a complete security framework (based on JAAS), and providing (Role-Based Access Control) mechanism for console and .
  • Managing instances : Karaf provides simple commands for managing multiple instances. You can easily create, delete, start and stop instances of Karaf through the console.

You should be using this tag if your question is related to the use of Karaf Framework.

549 questions
0
votes
1 answer

python/shell script to connect to Karaf console

I am writing a script in python which can connect to karaf console like sudo ./client and after logging I want to see what and all bundles are active by using commands like list| grep -i active.I want 1 single script for that. So these two commands…
Piku
  • 31
  • 7
0
votes
1 answer

How to test if a feature is installed in a karaf console script?

I need to write a karaf console script that uninstalls a feature, if it is present on karaf 3.0.4. So far I have not found any direct references mentionend in the documentation…
SpaceTrucker
  • 13,377
  • 6
  • 60
  • 99
0
votes
0 answers

Spring MVC war deployed to karaf not working?

I am trying to deploy a war to karaf using pax-web.I am not seeing any errors but it is not working. But if i go to karaf console and do a bundle:update everything is working fine. Is there a way to do bundle:update programatically with out…
mohanaki
  • 260
  • 2
  • 6
  • 15
0
votes
1 answer

Jboss Fuse 6.2, install custom features to profile in fabric

I was able to do what I'm goin to describe in Fuse 6.1 but now in Fuse 6.2 I get an exception and it is not working anymore. By following a tutorial, I build a "multi module" project that has a features component in order to install all the needed…
Jkike
  • 807
  • 6
  • 12
0
votes
2 answers

Make sure bundles use same dependencies versions

I am looking for a way to ensure that all the features I deploy in Karaf require dependencies that are of the same version. The project is composed of more than 40 bundles which makes it difficult to verify manually. I am thinking of developping a…
Oleg
  • 161
  • 1
  • 14
0
votes
1 answer

Per-thread items in a Karaf/CXF container

I need to set up so that an object is created once-per-thread in a Karaf CXF container, since I assume that the container will itself set up multiple service threads. I can just use a ThreadLocal, but is there some support in the blueprint.xml for…
bmargulies
  • 97,814
  • 39
  • 186
  • 310
0
votes
1 answer

Making a karaf/docker service read a configuration file

Starting from the io8 maven archetype, I'm setting up a Docker container containing a Karaf container containing a CXF restful web service. I want this to read a file when it starts up that parameterizes it. What's the procedure for setting up (a) a…
bmargulies
  • 97,814
  • 39
  • 186
  • 310
0
votes
1 answer

Karaf - running thread status after bundle restart

I'm using karaf 3.0.2. Let's suppose a bundle B (id 100) has launched some threads. What happens to these threads when I execute karaf@root()> restart bundle 100 ...when the running threads of bundle B are still active? Do these threads get…
RRM
  • 2,495
  • 29
  • 46
0
votes
1 answer

Loading bundle in felix fails due to dependency on itself

I'm clearly being moronic here but I can't see the problem: I'm trying to load a bundle in Karaf 4 M3 and the error I get is this org.osgi.framework.BundleException: Unable to resolve package-core [50](R 50.0): missing requirement [package-core…
magicaltrout
  • 494
  • 3
  • 14
0
votes
1 answer

Karaf 4.0.0 M2, Hibernate 4.3.6, and org.hibernate.PropertyAccessException

I am following the Karaf/Database tutorial by Christian Schneider at the following url: http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access My changes to this tutorial are to use MySql and Hibernate…
Randy Leonard
  • 655
  • 7
  • 21
0
votes
1 answer

Using Squeryl inside a OSGi container

Has anyone successfully gotten Squeryl to work inside a OSGi environment, specifically on Karaf 3.03. So far I have gotten the individual dependencies to load, scala libraries, squeryl and the jdbc driver.The installed bundles look something like…
0
votes
0 answers

OSGI. Waiting for timeout during installation of bundle (tinybundles)

I have a problem running pax exam test under karaf. During an installation of bundle 2015-05-20 14:16:42,644 | DEBUG | FelixStartLevel | BundleManager | 1 - org.apache.karaf.features.core - 3.0.0 | Checking…
Volodymyr Kozubal
  • 1,320
  • 1
  • 12
  • 16
0
votes
1 answer

How do I add camel-http4 to a Karaf features.xml file?

If I add mvn:org.apache.camel/camel-http4/2.15.1 Then I get the following error below. What is the right way to be able to use camel-http4 from within my blueprint camel routing within Karaf? How should I modify…
Phil
  • 46,436
  • 33
  • 110
  • 175
0
votes
1 answer

OSGi bundle (State - Active) (Spring - Started)

When I start karaf client and type list command i can see OSGi bundles statistic. For each OSGi bundle there is several values, and 'Spring' among them. I need programmatically get Spring state from all OSGi bundles where there is Spring…
Mike
  • 20,010
  • 25
  • 97
  • 140
0
votes
1 answer

Unable to locate Spring NamespaceHandler for XML schema namespace in OSGi (Karaf) with java standalone application

While deploying the Java standalone module as bundle which has a dependency with spring modules in Felix osgi container karaf(3.0.3). The spring 3.1.4 version is installed properly and it is imported in the bundle. However, while loading…
PSTADU
  • 31
  • 5