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

How to configure jmx port for karaf in docker container?

I would like to use visualvm to check threads running in the karaf which is in a docker container. What I did: expose 44444 and 1099 for the docker in org.apache.karaf.management.cfg, tried setting rmiRegistryHost and rmiServerHost several times…
HAO
  • 85
  • 8
2
votes
1 answer

Blueprint with CDI annotations + Karaf + JaxRX CXF ServiceConstructionException: No resource classes found

I am trying to follow the post http://blog.nanthrax.net/2011/08/jax-rs-services-using-cxf-and-karaf/ I am getting the following exception on installing the Service bundle any advise please where i am going wrong API Class REST API package…
2
votes
2 answers

Publishing JAX-RS endpoints with pax-web

I have REST endpoints published in OSGi container (Karaf) using javax.ws.rs annotations. HttpService is created by pax-web, and jax-rs services are published by com.eclipsesource.jaxrs/publisher. In order to use this publisher, a quite monstrous…
9ilsdx 9rvj 0lo
  • 7,955
  • 10
  • 38
  • 77
2
votes
0 answers

How can I register JSR-356 Websocket in PAX-Web? (In bundle, not WAR)

I have a problem with the PAX-Web. I've tried to register a Websocket service as declrarative, but it is unaccessible from web. I've tried the given websocket-jsr356-6.0.3.war and it works fine. As I see the WAR file handles differently the…
2
votes
1 answer

NoClassDefFoundError in Osgi environment

I am working with osgi on apache karaf and I am trying to use kafka and debezium to run into an osgi environment. kafka and debezium were not osgi ready (karaf will not consider them as bundles), so I did osgified them using eclipse "Plug-in…
larnouch
  • 189
  • 1
  • 15
2
votes
2 answers

Karaf : Recommended way to uninstall/install API's bundle, and how to avoid ghost bundle resolution

I'm using Karaf (2.4.* & 4.0.*) for the past two years, in different missions, and each time I faced caching problem with API bundles when it comes to uninstall/install them. Let's imagine the following scenario : I install (1) service-api/1.0.0,…
Jonathan Schoreels
  • 1,660
  • 1
  • 12
  • 20
2
votes
0 answers

Unable to successfully start the simplest Camel CDI route in Karaf 4.1.0 or ServiceMix 7.0.0 (Karaf 4.0.8)

I've been trying without success to build and deploy a simple route with Camel and CDI. I'm focused on deploying to ServiceMix 7.0.0, but have also tried this on a plane jane Karaf 4.1.0 and get precisely the same results. I built a very simple…
Bob Blackard
  • 211
  • 1
  • 8
2
votes
0 answers

Using jboss resteasy (Client-side) in an OSGi Bundle for Karaf

I want to query some data for a weather forecast from https://openweathermap.org/. Since I have some experience with the jboss resteasy api, I immediatly thought I could use this api for my rest client. However, I am struggling really hard to get…
tilt32
  • 41
  • 1
  • 9
2
votes
0 answers

Starting Nexus 3 Karaf console

In Chapter 16.2 of the Sonatype books for Nexus 3 it is stated that you can start the Karaf console by pressing enter after the nexus run command: Bundles can be loaded via the Karaf console. To enable the console, set karaf.startLocalConsole in…
2
votes
1 answer

Creating PostgreSQL DataSource via pax-jdbc config file on karaf 4

On my karaf 4.0.8 I've installed the feature pax-jdbc-postgresql. The DataFactory for PostgreSQL is installed: org.osgi.service.jdbc.DataSourceFactory] osgi.jdbc.driver.class org.postgresql.Driver osgi.jdbc.driver.name PostgreSQL JDBC…
9ilsdx 9rvj 0lo
  • 7,955
  • 10
  • 38
  • 77
2
votes
1 answer

MongoDB doesn't work on Karaf 4.0.8 with Camel 2.18.1

We created a simple test bundle, but as soon as we try to use MongoDB in one of our Camel routes, the route does not start anymore. The blueprint is quite simple:
maxdev
  • 2,491
  • 1
  • 25
  • 50
2
votes
1 answer

Logging in Apache KARAF

I'm trying to limit the log level to INFO in webconsole and to DEBUG in Log file. I have tried this: in org.ops4j.pax.logging.cfg: # Root logger log4j.rootLogger=INFO, out, osgi:* log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer #…
zied123456
  • 255
  • 1
  • 4
  • 17
2
votes
1 answer

dev:watch does not reload bundles on JBoss Fuse 6.3.0

I am porting my code from JBoss Fuse 6.2.1 to JBoss Fuse 6.3.0. On my development environment I used Maven to build -SNAPSHOTS of my Java projects, and have them automatically deployed using dev:watch command. I installed my bundle with install…
Alessandro Da Rugna
  • 4,571
  • 20
  • 40
  • 64
2
votes
3 answers

Adding new mvn url in Karaf fails with repo spec is empty

I have added a new mvn url in the mvn.cfg file in my local Karaf 4.0.2 installation like below: org.ops4j.pax.url.mvn.repositories= \ http://repo1.maven.org/maven2@id=central, \ …
Souciance Eqdam Rashti
  • 3,143
  • 3
  • 15
  • 31
2
votes
1 answer

Apache Karaf Blueprint Service is not injecting the objects

Karaf reference is not injecting the reference objects. Please see my setup and code. Version: apache-karaf-3.0.5 Part 1: Service class Service: package org.jrb.test; public interface MyService { String echo(String message); } package…