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
2 answers

Pax Exam execute command against Karaf

I am trying to run a PAX Exam test which starts a Karaf instance version 4.0.2 and then deploys some features. Everything works so far. However, I also want to run some commands to check that the bundles have been installed i.e. run "bundle:list"…
Souciance Eqdam Rashti
  • 3,143
  • 3
  • 15
  • 31
0
votes
1 answer

Error when running Karaf in ODL

A few minutes after initiating Karaf, I always receive this error. Cant figure out what the impact of this is or how to fix it: opendaylight-user@root>Exception in thread "config-pusher" java.lang.SecurityException: Insufficient roles/credentials…
user2883071
  • 960
  • 1
  • 20
  • 50
0
votes
0 answers

implementing component factory for multiple class with same names and retrieving through property/filter values

I am working on OSGi(Rev 4) project in which i have to use karaf registry. Either i can declare my implementation as Component or Service. ie) I can register my component/service in karaf with component factory/service Factory to produce objects of…
Shriram
  • 4,343
  • 8
  • 37
  • 64
0
votes
1 answer

After installing the scr feature in karaf the activate method is called twice

I am trying to install an OSGi bundle with the apache-karaf 2.3.10 with the example i have already posted in this link. I did the following steps 1. Downloaded apache-karaf version 2.3.10 2. Executed the command features:install scr. Successfully…
Shriram
  • 4,343
  • 8
  • 37
  • 64
0
votes
1 answer

Hawtio terminal plugin for Karaf 4.0.2

I have installed Apache Karaf 4.0.2 and Hawtio 1.456. The installation of Hawtio worked fine. But when I do bundle:list I see the "hawtio :: Karaf terminal plugin" in a failure state. However the hawtio functionality seems to be working. Is it an…
Souciance Eqdam Rashti
  • 3,143
  • 3
  • 15
  • 31
0
votes
1 answer

Maven build on karaf - opendaylight

i am new to open daylight project.. i want to install open daylight controller and integrate my yang model with this .. so if i execute my POST query on controller it get responded. i went through this tutorial…
0
votes
2 answers

How can I run OSGi blueprint in Felix in Scala?

I am able to get OSGi blueprint to work in Karaf, but I don't understand how to do it in Apache Felix, or my question can be also defined as how can I use OSGi blueprint in plain OSGi? I made an example here…
Phil
  • 46,436
  • 33
  • 110
  • 175
0
votes
1 answer

How to deploy configfile before bundles

Given a feature with a and a , how can I ensure that the file is deployed before the bundle? What I'm seeing is that my bundle gets started first and the file deployed second (even if is the first tag). I guess this…
Mirvnillith
  • 405
  • 5
  • 18
0
votes
1 answer

CXFNonSpringServlet in camel-cxf

I need to set the use-x-forwarded-headers Http header in camel-cxf like the below and make it as an OSGi bundle to be deployed in Karaf. cxf
Viral Gohel
  • 316
  • 1
  • 7
0
votes
1 answer

An equivalent to StickySession in Karaf/OSGI?

The issue is the following: in ma Karaf container, I have two modules, the first one is used to fetch data in the DB via a JPA interface implemented by Hibernate. Collections are fetched in a lazy way. The second module gets the object containing…
Oleg
  • 161
  • 1
  • 14
0
votes
1 answer

Session management with a container managed EntityManager

A collection needs to be fetched lazily. If I then try to access its components, I get the following Exception : failed to lazily initialize a collection of role: mapp3.model.ProductDefinition, could not initialize proxy - no Session So I…
Oleg
  • 161
  • 1
  • 14
0
votes
0 answers

Changing configuration for other bundles using ConfigurationPlugin

I have some bundles started in karaf and want to change their configuration during start. I created class that implements ConfigurationPlugin and registered it in karaf. When I installed bundle, my configuration plugin was invoked and changed…
0
votes
1 answer

Deploy JAX-WS on Karaf as an OSGi bundle

I have tried to deploy an simple JAX-WS web service on Karaf as an OSGi bundle. After export the web service as a War file and deploy it into the /deploy folder in Karaf, I found it can not be reached by…
0
votes
1 answer

Karaf OSGi camel-hdfs2

I'm having a tough time getting the camel-hdfs2 component to function as expected in a Karaf 4.0 OSGi container. It's a very simple camel route that is reading files from HDFS and simply writing the file name to a new file in /tmp. I've got it to…
bdgould
  • 1
  • 2
0
votes
1 answer

How to access System properies in karaf features file

I added a feature in karaf features xml file:${MY_VARIABLE}/temp.jar MY_VARIABLE is the system property that has the directory path. But when i try to install the feature i…
mohanaki
  • 260
  • 2
  • 6
  • 15