[ 
https://issues.apache.org/jira/browse/CAMEL-13416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16819471#comment-16819471
 ] 

Kamil edited comment on CAMEL-13416 at 4/16/19 8:38 PM:
--------------------------------------------------------

{code:java}
karaf@root()> feature:list |grep camel
camel-blueprint | 2.23.1 | x | Started | camel-2.23.1 |

karaf@root()> bundle:install -s mvn:io.myapp/myapp/0.0.1
Bundle ID: 324
Error executing command: Error installing bundles:
 Unable to start bundle mvn:io.myapp/myapp/0.0.1: 
org.osgi.framework.BundleException: Unable to resolve myapp [324](R 324.0): 
missing requirement [myapp [324](R 324.0)] osgi.wiring.package; 
(&(osgi.wiring.package=org.apache.camel.core.osgi)(version>=2.23.0)(!(version>=3.0.0)))
 Unresolved requirements: [[adapters.service [324](R 324.0)] 
osgi.wiring.package; 
(&(osgi.wiring.package=org.apache.camel.core.osgi)(version>=2.23.0)(!(version>=3.0.0)))]{code}
are you sure?


was (Author: eximius):
{code:java}
karaf@root()> feature:list |grep camel
camel-blueprint | 2.23.1 | | Started | camel-2.23.1 |

karaf@root()> bundle:install -s mvn:io.myapp/myapp/0.0.1
Bundle ID: 324
Error executing command: Error installing bundles:
 Unable to start bundle mvn:io.myapp/myapp/0.0.1: 
org.osgi.framework.BundleException: Unable to resolve myapp [324](R 324.0): 
missing requirement [myapp [324](R 324.0)] osgi.wiring.package; 
(&(osgi.wiring.package=org.apache.camel.core.osgi)(version>=2.23.0)(!(version>=3.0.0)))
 Unresolved requirements: [[adapters.service [324](R 324.0)] 
osgi.wiring.package; 
(&(osgi.wiring.package=org.apache.camel.core.osgi)(version>=2.23.0)(!(version>=3.0.0)))]{code}

are you sure?

> 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
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.0.0, 3.0.0-M3
>
>
> 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)

Reply via email to