Questions tagged [apache-karaf]

Karaf is an enterprise grade OSGi runtime/container, with configurable framework implementation (Equinox, Felix). Originally the platform "kernel" for FuseSource ESB/ServiceMix it was added as an Apache top level project.

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 SSH 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.

It has all the benefits of OSGi; lightweight, dynamic, highly configurable, etc

Links:

  • website
  • users' mailing list: user@karaf.apache.org
  • developers' mailing list: dev@karaf.apache.org
  • nabble (archived mailing list content)
1353 questions
5
votes
2 answers

Determine projectName for VS Code launch from maven projects

I am working in a complex project structure of bundles and plugins for karaf. When attaching to the process, I cannot use WATCH as the project cannot be found: Cannot evaluate because of java.lang.IllegalStateException: Project XY cannot be…
Beginner
  • 5,277
  • 6
  • 34
  • 71
5
votes
1 answer

Uses constraint violation. Unable to resolve resource -javax.xml.bind.annotation and jakarta.xml.bind-api

I searched a looooot and Im not able to find the solution for my problem. Im using osgi, karaf and java 8. I have some modules, for example: WEBSERVICE-SOMETHING inside this module lets say API, PERSISTENCE, ADAPTER persistence and api starts fine,…
Tiago Machado
  • 355
  • 7
  • 24
5
votes
1 answer

OSGi Karaf Spring Boot 2.1.4-Release Error

I am trying to build an OSGi Karaf app using Spring Boot 2.1.4 with Java 8, OSGi version 5.0.0 and Apache Karaf 4.1.3. I have created the following project in GitHub which builds and runs fine when I use Spring Boot 1.5.9. But when I change the…
NikosDim
  • 1,398
  • 2
  • 21
  • 40
5
votes
2 answers

ScriptEngineManager and ScriptEngine can not be loaded in Karaf OSGi (Nashorn not found)

I am trying to use ScriptEngineManager and ScriptEngine to execute some JavaScript code with Java. I use Java 8 I am executing this code under Karaf OSGi. The example I used works fine in a sample Java Class, but packing it in a bundle gives me this…
Ali Ben Messaoud
  • 11,690
  • 8
  • 54
  • 87
5
votes
2 answers

Why am I getting this "split package" warning?

I'm building a .kar-file, but when I run mvn package I'm getting this error: [INFO] --- maven-bundle-plugin:2.4.0:bundle (default-bundle) @ common --- [WARNING] Bundle se.eman.path.to.my.package:common:bundle:1.0.0-SNAPSHOT : Split package, multiple…
Calle at e-man
  • 145
  • 2
  • 9
5
votes
4 answers

Tutorial for ServiceMix 4.2

I try to figure out a start with Apache ServiceMix 4.2 Sadly the tutorials on the homesite seem pretty much outdated ... with 4.2 the services seem to be started out of the box and be configured with karaf, while the tutorials talk about copying…
Akku
  • 4,373
  • 4
  • 48
  • 67
5
votes
2 answers

karaf-maven-plugin: Defining a dependency as a feature

I am trying to make the karaf-maven-plugin generate a feature file for my application. The application depends on the cxf feature, but i can't seem to make the plugin generate the feature xml to reflect this. Cutout from my feature module: …
Martin Nielsen
  • 1,865
  • 6
  • 30
  • 54
5
votes
1 answer

osgi blueprint how to read resource file in bundle

I use osgi and blueprint, i search how to read file in my bundle? Such as : mybundle file.json OSGI-INF/blueprint/blueprint.xml WEB-INF * I want read file.json in myservice.
timactive
  • 789
  • 6
  • 27
5
votes
1 answer

Aries Blueprint in Karaf - Can a blueprint reference an external properties file

I am using an ActiveMQ blueprint to setup a JMS Connection Pool. I also use Camel to service some functionality. I use the org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer to allow the use of an external properties file in setting…
user2130332
  • 113
  • 2
  • 6
5
votes
1 answer

Spring Jdbc declarative transaction management within karaf

I have project module, which is getting built as a osgi bundle (spring-dm). Bundles are getting deployed in karaf container. I have database interaction classees, which are developed using spring-jdbc. I am not able to setup declarative…
Dhananjay
  • 3,903
  • 2
  • 29
  • 44
5
votes
0 answers

Karaf Cellar throwing exception with blueprint route deployment

I followed the example on Karaf Cellar as given under, http://blog.nanthrax.net/2011/11/apache-karaf-cellar-and-dosgi/ I created 3 OSGi bundles, namely, service (Bundle1), service-implementation (Bundle2) and client (Bundle3). I have 2 karaf…
dealbitte
  • 51
  • 1
4
votes
0 answers

org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR

I am developing my first application which uses karaf and kafka, I simply create a consumer and when I run my application in karaf, it displays the following errors. org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : An exception occurred…
Ghiloufi
  • 311
  • 4
  • 10
4
votes
1 answer

Shut the default web page of Apache Aries down

I am using the Apache Aries in karaf. I have setup my homepage in a separate bundle. The problem is that when i stop the 'web-home' bundle of mine, I see the apache aries default page. In the karaf-logs I see the default page is always called…
Makan
  • 2,508
  • 4
  • 24
  • 39
4
votes
5 answers

How to fix org.osgi.framework.BundleException: Unable to cache bundle?

I'm working with an OSGi BundleActivator code. When I'm trying to install it using Apache Karaf I always get a Unable to install bundle mvn:com.baeldung/osgi-intro-sample-activator/1.0-SNAPSHOT: org.osgi.framework.BundleException: Unable to cache…
Bogdan Salyp
  • 43
  • 1
  • 7
4
votes
1 answer

Apache Karaf feature dependency

In feature.xml (Apache Karaf provisioning mechanism) tag feature has a dependency attribute. What does this attribute do? For example: custom-feature-name Where can I find any information on it? After a brief…
akvyalkov
  • 273
  • 5
  • 17
1 2
3
90 91