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
19
votes
1 answer

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

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…
Michal Chudy
  • 1,883
  • 2
  • 21
  • 41
11
votes
1 answer

Can you use a Hibernate 5.2 StatelessSession in an OSGi environment (like Karaf) without the use of JTA?

I'm trying to use a StatelessSession to do some bulk inserts in an OSGi environment (Karaf 4.0.7), but when I try to commit my transaction I get be.ikan.lib.orm.base.exceptions.PersistenceBrokerException: org.hibernate.TransactionException: Cannot…
Frank S
  • 121
  • 5
10
votes
1 answer

Why is IntelliJ skipping breakpoints while remotely debugging

I have been asked to debug a Java application installed in Apache Karaf (OSGi) running in a VM hosted on my dev machine. My colleague has been able to do remote debugging successfully using Eclipse. My tool of choice is IntelliJ and in my attempts…
allanc
  • 113
  • 1
  • 1
  • 5
9
votes
6 answers

Script Karaf shell commands?

I need to issue Karaf shell commands non-interactively, preferably from a script. More specifically, I need to tell Karaf to feature:install a set of features in an automated way. # Attempt to install a feature in a way I could script bash>…
dfarrell07
  • 2,872
  • 2
  • 21
  • 26
9
votes
1 answer

How to deploy easily to Karaf Osgi container with maven project

I'm developing an OSGI bundle for parsing a PDF file using PDFBox library. I use maven to build the project and Karaf as the OSGI container. The PDFBox library is OSGI compatible so I thought this would be easy. But I just can't get the deployment…
palto
  • 3,523
  • 5
  • 32
  • 38
7
votes
1 answer

What are the differences between features vs bundles vs dependencies vs prerequisites vs requirements in Apache Karaf?

It is unfortunate that the OSGi container implementation, called Karaf, is poorly documented. Concepts are brushed over, and relationships between terminology are not made. My conclusions after reading the text authored by Karaf developers (I…
Jonathan Komar
  • 2,678
  • 4
  • 32
  • 43
7
votes
2 answers

How to deploy a karaf feature from a local maven repository?

I've created by first project for karaf (4.0.1). So far I've got the following: an application bundle built with the maven-bundle-plugin. There are going to be more... a karaf feature created with the karaf-maven-plugin. a karaf-assembly created…
leftbit
  • 848
  • 1
  • 7
  • 18
7
votes
1 answer

Best way to debug OSGI bundles in Karaf

To date, I've been successful at building OSGI bundles, and invoking web services defined in these bundles via Apache CXF. Next, I'd like to be able to set breakpoints in my bundles as they are executed within the Karaf environment. I've looked…
Randy Leonard
  • 655
  • 7
  • 21
6
votes
3 answers

Can't capture Apache Karaf client output

I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client and also capture the output of these commands, so as to make sure the commands ran…
The Governor
  • 1,152
  • 1
  • 12
  • 28
5
votes
1 answer

How to create Karaf shell command in Gradle project

I'm trying to create own Karaf shell command and I'm willing to do this using Gradle because entire project is on Gradle. The only relevant documentation I've found so far is here http://karaf.apache.org/manual/latest/#_shell_commands and it says…
Xtra Coder
  • 3,389
  • 4
  • 40
  • 59
5
votes
1 answer

How to debug NullPointerException at apache.jena.queryExecutionFactory during create?

I am working with org.apache.jena with karaf. While trying to query my model I get a NullPointerException I printed all variables I use for creating the query and all(queryString, inferedModel) are not null. Here is what my code looks like : Model…
Deyesta
  • 139
  • 11
5
votes
1 answer

Karaf feature install missing requirement osgi.service but it is there

I have a datasource feature that exports a datasource as an OSGi service: > services -p 2038 OPS4J Pax JDBC Config (2038) provides: -------------------------------------- objectClass = [org.osgi.service.cm.ManagedServiceFactory] service.bundleid =…
bmcdonald
  • 311
  • 6
  • 12
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
4
votes
1 answer

Tomcat Apache ServiceMix integration issue

We are trying to integrate a web application running on Apache Tomcat 8.5.3 with Apache ServiceMix 7.0.1 using Apache Felix bridge (org.apache.felix.http.bridge-4.0.0.jar). All the steps listed here are done…
Praveen
  • 106
  • 7
4
votes
1 answer

Efficient Karaf development process

I would like to be more efficient developing OSGi bundles using karaf. my ideal process will be: karaf running in the background deploy all my bundles and dependencies (script) make karaf watch my maven local repo for any changes in my…
Gadi
  • 1,539
  • 22
  • 37
1
2 3
36 37