• Home
  • News
  • Get started
  • Projects
  • Download
  • Documentation
  • Community
  • Stories

Documentation

Karaf Runtime

4.x series

[ online | html | pdf ]

Latest update

3.x series

[ online | html | pdf ]

Latest update
Karaf Cellar

4.x series

[ online | html | pdf ]

Latest update

3.x series

[ online | html | pdf ]

Latest update
Karaf Decanter

2.x series

[ online | html | pdf ]

Latest update

1.x series

[ online | html | pdf ]

Latest update

Examples

You are looking for some examples to learn how to implement bundle for Apache Karaf ? There is some usefull examples include in the source code, you can also browse and view documentation on the github of the projet.
If you are looking for examples that are missing here or you want to share your example with the community, please contact us on the mailing list and we will add it with pleasure.

Name Description Github
Blueprint using services with XML or annotations.
Branding branding the look'n feel of the shell console for your own Karaf distribution.
Bundle the bundle is the core deployment unit when using OSGi.
Camel this example shows how to use Apache Camel in Karaf. Apache Camel is a integration framework, allowing you to integrate several systems and applications all together.
CDI this example shows how to use CDI in Karaf, with annotations (Inject, etc).
Shell Command creating a shell command.
Configuration this example shows how to use configuration in your application, introducing different approach.
Deployer creating a Karaf deployer service on the deploy folder.
Docker this example shows how to easily create Docker image with Karaf and your applications. It shows two kinds of packages: static or dynamic.
Dump creating a dump provider service.
HTTP resource creating a very simple bundle that just register an empty resource service.
Integration test creating integration tests in addition of unit tests for your bundles.
JAAS using the Karaf Security service in different way.
JDBC using simple JDBC implementation with Pax-JDBC and an Apache Derby embedded database.
JMS using a JMS ConnectionFactory service in code that you can implement to interact with JMS.
JPA using JPA with entity manager for the persistence implementation.
Pax Logging Appender registering a custom Pax Logging appender.
Maven using the Karaf Maven plugin with goals like assembly, client, deploy, kar, run...
MBean registering a JMX MBean in the Apache Karaf MBeanServer
Profile creating several profiles (in a registry) and use these profiles to create custom distributions.
Redis using a Redis server (pub/sub, or key/value store) within Karaf.
REST using JAX-RS to implement a REST service.
Scheduler creating a runnable service periodically executed by the Apache Karaf scheduler.
Service Component Runtime using services with annotations with the OSGi compendium specification.
Servlet registering a servlet in the Karaf HTTP Service with different approaches.
SOAP using JAX-WS to implement a SOAP service.
URL Namespace Handler creating a new URL namespace handler and use it in all Apache Karaf parts.
War creating a regular war to be deployed in Apache Karaf.
Websocket this example shows how to register a websocket in the Karaf HTTP Service.
GraphQL this example shows how to use GraphQL in the context of a HTTP servlet, websocket and commands in Apache Karaf.

Security Advisories

CVE-2014-0219 : Apache Karaf enables a shutdown port on the loopback interface, which allows local users to cause a denial of service (shutdown) by sending a shutdown command to all listening high ports.

Notes »

CVE-2016-8750 : Apache Karaf's LDAPLoginModule is vulnerable to LDAP injection.

Notes »

CVE-2018-11786 : Enforce SSH permission based on RBAC.

Notes »

CVE-2018-11787 : Unsecure access to Gogo shell in the webconsole.

Notes »

CVE-2018-11788 : XXE vulnerability found on Apache Karaf.

Notes »

CVE-2019-0191: Zip-slip vulnerability in KAR deployer.

Notes »

CVE-2019-0226: Arbitrary file write vulnerability in Config service.

Notes »

CVE-2020-11980: A remote client could create MBeans from arbitrary URLs.

Notes »

CVE-2021-41766: Insecure Java Deserialization.

Notes »

CVE-2022-22932: Path traversal flaws

Notes »

CVE-2022-40145: JDBC JAAS LDAP injection

Notes »

CVE-2024-34365: Cave SSRF and arbitrary file access

Notes »

Articles

Apache Karaf runtime 4.3.5 and 4.2.14 are available, status regarding log4shell
What's new in Apache Karaf Decanter 2.8.0 ?
What's new in Apache Karaf runtime 4.3.3 ?
What's new in Apache Karaf runtime 4.3.2 ?
What's new in Apache Karaf runtime 4.3.1 ?
What's new in Apache Karaf runtime 4.2.11 ?
What's new in Apache Karaf Decanter 2.7.0 ?
Complete metrics collections and analytics with Apache Karaf Decanter, Apache Kafka and Apache Druid
Coming in Apache Karaf 4.3.1: features JSON
What's new in Apache Karaf 4.3.0
Testing custom Apache Karaf distributions
Apache Karaf and log4j2 appenders
New collectors in Apache Karaf Decanter 2.4.0
Apache Karaf Decanter 2.4.0, new processing layer
How to create a custom Karaf distribution
Apache CXF metrics with Apache Karaf Decanter
Apache Karaf Decanter 2.3.0, new Prometheus appender
Apache Karaf Decanter 2.3.0, the new alerting service
Introducing Apache Karaf Cave 4.2.x
Using Apache Karaf with Kubernetes
Apache Karaf dynamic and static approach, docker and kubernetes
Improvements on the Apache Karaf scheduler
Apache Karaf on Azure cloud
Apache Karaf and Docker
New Karaf HTTP proxy feature
Building Angular WebBundle for Apache Karaf
Monitoring Apache Cassandra with Apache Karaf Decanter
What's new in Apache Karaf Cellar 4.0.0 ?
Creating a plugin system with Karaf and OSGi MicroServices
Monitoring and alerting with Apache Karaf Decanter
Apache Karaf Christmas gifts: docker.io, profiles, and decanter
Encrypt ConfigAdmin properties values in Apache Karaf
MDC logging with Apache Karaf and Camel
JavaMagazin Articles (in German)
Apache Syncope backend with Apache Karaf
Apache Karaf, Camel, ActiveMQ with Falcon for Hadoop CDC solution
Apache Karaf, Cellar, Camel, ActiveMQ monitoring with ELK (ElasticSearch, Logstash, and Kibana)
Coming in Karaf 3.0.0: new enterprise JPA (OpenJPA, Hibernate) and CDI (OpenWebBeans, JBoss Weld) features
Coming in Karaf 3.0.0: new enterprise JDBC feature
Coming in Karaf 3.0.0: new enterprise JNDI feature
Coming in Karaf 3.0.0: RBAC support for OSGi services and console commands
Coming in Karaf 3.0.0: subshell and completion mode
Coming in Karaf 3.0.0: JAAS users, groups, roles, and ACLs
Karaf and Pax Web: disabling reverse lookup
Pax Logging: loggers log level
Apache Hadoop and Karaf, Article 1: Karaf as HDFS client
Bind certain Web-Applications to specific HttpConnectors II
Bind certain Web-Applications to specific HttpConnectors
Integration in the cloude with Apache Karaf, Cellar and Camel
Load balancing with Apache Karaf Cellar, and mod_proxy_balancer
Multiple HTTP connectors in Karaf
Communication between two remote Camel routes with Karaf Cellar
xmppgtalk shell connector for Karaf and Gogo shell
Create custom log4j appender for Karaf and Pax Logging
How to enable HTTPs certificate client auth with Karaf
Declarative Services with Karaf (SCR)
Apache Karaf 2011 Millesime
Coming in Karaf 3.0: new KAR service, command, and management
Overview on Apache Karaf, Pax Web, and Camel archetypes
Do you know Apache Karaf Maven plugins ?
Apache Karaf moved to OSGi r4.3
Use Camel, CXF, and Karaf to implement batches
JAX-RS services using CXF and Karaf
What's new in Apache Karaf 2.2.4 ?
Adding custom log-appender to Pax Logging
Adding additional ServletContext to Pax Web
One Year of Apache Karaf
Apache Karaf Child Instances, what are they, and why should I use them ?
From Eclipse Tycho to Apache Karaf: the easy way!
http://developer.eclipsesource.com/slides/deploy-and-manage-rap-applications/#/6

Tutorials

Karaf Tutorials (Declarative Services, Blueprint, Config Admin, Database Access, REST, Camel, ...)
Combining Karaf Features, PAX URL, and Maven to deploy a plain JAR as an OSGi bundle
Running aspects under OSGi 4.2 with Karaf
Run a Google Web Toolkit 2 project on Apache Karaf/ServiceMix

Books

Apache Karaf Cookbook
Learning Apache Karaf
OSGi Starter - The essential guide to modular development with OSGi for the serious application developer
OSGi in Action
Java Application Architecture: Modularity Patterns with Examples Using OSGi

Bloggers

Guillaume Nodet's Blog
Jean-Baptiste Onofre's Blog
I Code by the Sea
Ioannis Canellos Blog
The Code-House Blog
Christian Schneider's Blog
Achim Nierbeck's Blog
Francois Papon's Blog

Ready, efficient, and productive with Karaf in a minute !

Read Documentation »

Back to top

© 2018-2022 Apache Software Foundation - Privacy Policy - Apache Events - Licenses - Security - Sponsorship - Thanks
Apache Karaf, Karaf, Apache, the Apache logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.

'); $(document).on('click', '.mobile-nav-toggle', function(e) { $('body').toggleClass('mobile-nav-active'); $('.mobile-nav-toggle i').toggleClass('fa-times fa-bars'); $('.mobile-nav-overly').toggle(); }); $(document).on('click', '.mobile-nav .drop-down > a', function(e) { e.preventDefault(); $(this).next().slideToggle(300); $(this).parent().toggleClass('active'); }); $(document).click(function(e) { var container = $(".mobile-nav, .mobile-nav-toggle"); if (!container.is(e.target) && container.has(e.target).length === 0) { if ($('body').hasClass('mobile-nav-active')) { $('body').removeClass('mobile-nav-active'); $('.mobile-nav-toggle i').toggleClass('fa-times fa-bars'); $('.mobile-nav-overly').fadeOut(); } } }); } else if ($(".mobile-nav, .mobile-nav-toggle").length) { $(".mobile-nav, .mobile-nav-toggle").hide(); } })(jQuery);