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

Getting a bundle state via script from Karaf 3.0.5

I can check a bundle state from Karaf Console by doing:- karaf@root>bundle:list | grep camel-test 246 | Active | 50 | 2.16.1 | camel-test Is there a way I can do this programatically via some script running on the…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
0 answers

Execute Command with Karaf + SSH + Java

I'm trying to connect to karaf from SSH from java (as shown in the documentation), the thing is, i am not able to execute any command from my java code. What i'm trying to do is to stop and start bundles from java. i've already tried to use both…
0
votes
0 answers

Two different web bundles in karaf is causing issues

I have implemented two rest based operations. Each operation resides inside two different web bundles(projects). When i deploy the first web bundle. I was able to access the rest based operations which are exposed. After deploying the second i am…
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

How to set jetty.xml fragment bundle property in Karaf

I created a fragment host for org.ops4j.pax.web.pax-web-jetty which contains a jetty.xml file which is perfectly picked up inside Karaf. This jetty.xml file contains a line like this:
Jerome
  • 61
  • 9
0
votes
1 answer

Using log4j json-event-layout with Karaf 3.0.5 running under servicemix

I am trying to use JSONEventLayoutV1 as the pattern layout for karaf logging to log all events in json format. The steps that I have followed. Modified the pom.xml file of jsonevent-layout as shown…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
2 answers

How to install opendaylight restconf

Anybody know how to install opendaylight restconf in a custom karaf distribution. I tried adding the rest conf feature repo and tried to do a feature install. But this will fail by saying odl-config-persister is missing. When you try to install…
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

Install odl-restconf in custom karaf distribution

I have a custom karaf installation. I want to do a feature:install odl-restconf. for doing this i have done a feature:repo-add of feature file available in the below location…
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

karaf Accessing resources inside webinf folder

I have deployed a webbundle in karaf. In the web-inf folder i have kept some files. is there a way to access those using absolute path. Or do i need to keep the reources in karaf deploy folder.
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

Karaf post request fails with javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/oro/text/regex/MalformedPatternException

Hi I have deployed a webservice bundle successfullly in karaf. When i post a request i am getting the below error. javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/oro/text/regex/MalformedPatternException Karaf is not able…
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

@Before can I use it for initialization

In pax exam I want certain things to be common for all the test function. For doing this i have used @Before, problem in using @Before method is that it will get called before each test method. Is there way to tackle this problem. Is there some…
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

Karaf 3.0.0 Configuration Admin with array values

I am trying to use configuration file to persist OSGi configuration in Karaf 3.0.0 and having some issue when using property with array of values. My configuration file is placed in /etc folder and looks something like this: property =…
0
votes
1 answer

Point Karaf paxexam to a custom location

Hi is there a way to point the paxexam karaf to a custom location i.e a karaf installation in your file system return new Option[] { …
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
1 answer

Karaf retrieve a service object / reference from bundle context

In Karaf version 3.0.3 i was able to retrieve the ServiceReference object using the below code ServiceReference serviceReference = (ServiceReference) bundleContext.getServiceReference(CustomService.class.getName()); But in Karaf 4…
Charity
  • 213
  • 1
  • 5
  • 23
0
votes
0 answers

Unresolved constraint error( com.sun.jdi ) while deploying REST Servlet WAR in Karaf

I wrote a simple jersey webservice ( servlet based WAR ) to be OSGIfied and deployed into karaf . The application was coded using eclipse and as a maven web project, designed to be deployed as a WAR. Compiles & installs correctly and the war is…
NishM
  • 1,706
  • 2
  • 15
  • 26
0
votes
1 answer

Karaf executing commands in java console

The below code executes karaf commands in the console. This is working fine in karaf version 3.0.3. It fails in 4.0.0 or above @Inject CommandProcessor commandProcessor; private class dummyCallable implements Callable{ final…
Charity
  • 213
  • 1
  • 5
  • 23