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

Karaf 4.1 - How to add DynamicImport-Package tag within a third party osgi jar bundle?

I have a problem in the execution of a own bundle within Karaf 4.1, I am using Shiro for to persist users sessions, but when I recover the saved session, I have got an exception as: Caused by: java.lang.ClassNotFoundException:…
christmo
  • 351
  • 2
  • 18
2
votes
2 answers

How to install `kie-camel` feature in JBoss Fuse 6.2

I'm trying to deploy a drools component to a vanilla JBoss Fuse 6.2 server. I first install the drools features url JBossFuse:karaf@root> features:addurl mvn:org.drools/drools-karaf-features/6.1.0.Final/xml/features before installing the drools…
Lewis Watson
  • 543
  • 1
  • 4
  • 15
2
votes
1 answer

openJPA batch update pattern

I need to update thousands of Entities and the logic can not be put into a SQL statement. When using non-managed JPA the pattern I use is: long commitThreshold = 100; // or other appropriate value try { em.beginTransction().begin(); for(list…
Timothy Vogel
  • 1,363
  • 2
  • 21
  • 39
2
votes
1 answer

Karaf webbundle not able to find persistence.xml

I have written a karaf web bundle(wab). I have kept persistence.xml in META-INF/persistence.xml as well as tried putting in WEB-INF/classes/META-INF/persistence.xml when i try to create an EntityManagerFactory i am getting the below…
2
votes
1 answer

how to configure jms queue inside blueprint.xml

how to configure jms queue(using activemq inside karaf) inside blueprint.xml which present inside karaf deploy folder.. below is my code which shows config for jms connection inside blueprint.xml..
Aman
  • 31
  • 3
2
votes
1 answer

CXF in Karaf: how to configure bean validation on subresources (preferably using Blueprint)?

I'm using Dinamics Features of CXF in Karaf and faced with the issue that Bean Validation does not work for subresources. E.g. in the following code: @Path("services") public interface Service { @Path("{id}/orders") public…
Dmitry
  • 124
  • 1
  • 6
2
votes
2 answers

karaf configuration property is garbled

I implement org.osgi.service.cm.ManagedService interface to get Karaf configuration. But when I give a Chinese value to the property, it is garbled.Initially, the files in the etc folder are encoded in latin1. I have tried to set utf-8 encoding, but…
2
votes
2 answers

Karaf exception is thrown while installing org.fusesource.leveldbjni

Hi i am trying to install the below dependency in karaf org.fusesource.leveldbjni leveldbjni-all 1.8 I am getting the below Exception Exception…
Charity
  • 213
  • 1
  • 5
  • 23
2
votes
1 answer

Creating a single camel application bundle with all dependencies using maven3

I am trying to create a camel application bundle so that I can run it in service mix 6.1.0 under karaf. As per Ralf I tried the KAR format. My pom.xml looks like below:-
tuk
  • 5,941
  • 14
  • 79
  • 162
2
votes
2 answers

Java classloader usage in OSGi

I have a question about the usage of Java ClassLoader in OSGi. I wrote two OSGi bundles, namely server bundle and client bundle. In server bundle, I implemented BundleActivator like: public class Activator implements BundleActivator { public…
ruanhao
  • 4,663
  • 6
  • 28
  • 43
2
votes
1 answer

How to specify Jetty connector for Pax Web DefaultResourceMapping

I am using Camel-CXF to publish a web service from a bundle. I use blueprint for configuration. My understanding is that this CXF configuration will dynamically create a Jetty connector on the specified port and publishes the CXF servlet at the…
Ralf
  • 6,735
  • 3
  • 16
  • 32
2
votes
1 answer

Migrate OSGI application from Karaf 2.3.4 to Websphere Application server

I have an OSGI application deployed in Karaf v2.3.4, it worked well, but I want to migrate it to WebSphere application server, I want to know the difference between these two servers, and the guidlines for doing that thanks for your help
2
votes
1 answer

profile-refresh in Fuse 6.2 does not reload snapshot bundle

I am running JBoss Fuse 6.2.0. I built a small camel application that just writes to the log every 5 seconds. I built it and installed the SNAPSHOT bundle jar in my local Maven repository. In the Karaf console I did the…
npeder
  • 788
  • 10
  • 26
2
votes
0 answers

How to use special characters in Maven repository URL's password for karaf? (org.ops4j.pax.url.mvn.repositories)

I am trying to configure it so that Karaf can access a Nexus Sonatype Server using a password which contains special characters. I found the link here: https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol#MvnProtocol-repositories which…
catagon87
  • 548
  • 5
  • 21
2
votes
3 answers

How can I install postgresqljdbc to work in Karaf OSGi?

I want to install org.postgresql/postgresql/9.4-1201-jdbc41 in Karaf but I get errors. How can I resolve these errors? Strangely on Windows my Karaf doesn't have errors with this Postgres jdbc but on Ubuntu it has these errors. Any clues…
Phil
  • 46,436
  • 33
  • 110
  • 175