You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Kamil (JIRA)" <ji...@apache.org> on 2019/04/12 18:47:00 UTC

[jira] [Created] (CAMEL-13416) Please add camel-core-osgi to Camel Karaf feature repo

Kamil created CAMEL-13416:
-----------------------------

             Summary: Please add camel-core-osgi to Camel Karaf feature repo
                 Key: CAMEL-13416
                 URL: https://issues.apache.org/jira/browse/CAMEL-13416
             Project: Camel
          Issue Type: Improvement
          Components: karaf, osgi
    Affects Versions: 2.23.1
            Reporter: Kamil


I was following this documentation [http://camel.apache.org/karaf.html] in order to make Camel work in Karaf.

Many tutorials point to this configuration:
{code:java}
@Override
public void start(final BundleContext bundleContext) throws Exception {
  camelContext = new OsgiDefaultCamelContext(bundleContext);
  registrationCamelContext = bundleContext.registerService(CamelContext.class, camelContext, null);
  camelContext.start();
}
{code}
Unfortunately, when I install Camel in karaf:
{code:java}
karaf@root> feature:repo-add camel 2.23.1
{code}
only camel-core can be installed, while camel-core-osgi is missing.

Unfortunately camel-core contains only 
{code:java}
DefaultCamelContext{code}
which causes classpath problems in Karaf. For example I import camel-http4, but I get:
{code:java}
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http4://my.site due to: No component found with scheme: http4
{code}
or I import camel-jackson, but I get:
{code:java}
Caused by: java.lang.IllegalArgumentException: Data format 'json-jackson' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath
{code}
The solution is to use:
{code:java}
OsgiDefaultCamelContext{code}
which is located in camel-core-osgi, which is unavailable in Camel Karaf repo.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)