How to install camel-osgi in apache-karaf-4.0.4 - apache-camel

I tried to installed camel-osgi using below command. It given an error.
karaf#root()>feature:install camel-osgi
Error:
Error executing command: No matching features for camel-osgi/0.0.0

You first have to install the feature repository of camel before using any camel feature.
feature:repo-add camel 2.16.2
feature:install camel-core
Karaf can also show you the available features using feature:list.

Related

apache-camel 3.4.0 - Error executing command: No matching features for camel-catalog/0

Expected behaviour with camel version 2.15.2/2.24.1
Below url has feature as "camel-catalog" 
https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/2.15.2/apache-camel-2.15.2-features.xml
<feature name="camel-catalog" version="2.15.2" resolver="(obr)" start-level="50">
<feature version="2.15.2">camel-core
mvn:org.apache.camel.karaf/camel-karaf-commands-catalog/2.15.2
Exception while deploying feature ="camel-catalog" on Karaf Container with camel 3.x-
karaf#root()> feature:install camel-catalog
Error executing command: No matching features for camel-catalog/0
Query -
Upgraded camel version 3.4.0 now feature ="camel-catalog" is not there and but it require to install in Karaf container So what we can do to resolve this.
https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
Any help/suggestion is most welcome.
The camel-catalog feature is not available as a feature in Camel 3, you dont need to install it, you get catalog installed via installing camel - features:install camel.
See the migration 2.x to 3.x guides: https://camel.apache.org/manual/latest/camel-3x-upgrade-guide.html

Karaf feature:install throws Unsupported 'Bundle-ManifestVersion' value: 1

I am new to Karaf and trying to learn how to handle it.
On the way I tried to add Camunda features.
Like described on https://github.com/camunda/camunda-bpm-platform-osgi/tree/master/camunda-bpm-karaf-feature
at first, I added the repo:
feature:repo-add mvn:org.camunda.bpm.extension.osgi/camunda-bpm-karaf-feature/4.1.0/xml/features
then I tried to install them;
feature:install camunda-bpm-karaf-feature-full
unfortunately I got this Exception
org.osgi.framework.BundleException: Unable to build resource for mvn:xmlpull/xmlpull/1.1.3.1: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:82)
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:67)
at org.apache.karaf.features.internal.region.SubsystemResolver.prepare(SubsystemResolver.java:180)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:379)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.felix.utils.resource.ResourceBuilder.doBuild(ResourceBuilder.java:90)
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:80)
... 9 more
Error executing command: Unable to build resource for mvn:xmlpull/xmlpull/1.1.3.1: Unsupported 'Bundle-ManifestVersion' value: 1
I am using Karaf version 4.2.1
Does somebody know what I am doing wrong?
One of the features depend on xmlpull 1.1.3.1 which has Manifest-Version: 1.0 in MANIFEST.MF thus making it an OSGi R3 bundle.
Apache Felix supports bundles conforming the OSGi Release 4 (or newer) only (Manifest-Version: 2.0) which is why it rejects xmlpull. See the Felix source for reference.
If you control the source consider wrapping xmlpull and installing the wrapped bundle from the features. You can also play around with the Karaf console; for example, install -s wrap:mvn:xmlpull/xmlpull/1.1.3.1.

features:uninstall -v or features:uninstall --verbose is not showing what is being done in Karaf 2.4.0.redhat-630310

I am using Jboss fuse 6.3 and one of my features file when trying to uninstall throwing TimeoutException (below mentioned is detail). This features has one bundle which is communicate with service cloud using camel steaming API.
I wanted to see what Karaf is uninstalling when ran features:uninstall -v . But Karaf is showing only
Uninstalling feature . Any suggestion, how can we see what Karaf is trying to uninstall and where it is stuck to get timeout exception.
Any idea suggestion will be highly appreciated. Thank you so much in advance.
java.util.concurrent.TimeoutException
at java.util.concurrent.AbstractExecutorService.doInvokeAny(AbstractExecutorService.java:184)[:1.8.0_144]
at java.util.concurrent.AbstractExecutorService.invokeAny(AbstractExecutorService.java:225)[:1.8.0_144]
at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper$4.call(ScheduledExecutorServiceWrapper.java:184)
at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper$15.call(ScheduledExecutorServiceWrapper.java:452)
at org.apache.aries.blueprint.utils.threading.RWLock.runReadOperation(RWLock.java:35)
at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper.runUnlessShutdown(ScheduledExecutorServiceWrapper.java:447)
at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper.invokeAny(ScheduledExecutorServiceWrapper.java:178)
at org.apache.aries.blueprint.container.BlueprintEventDispatcher.callListener(BlueprintEventDispatcher.java:199)
at org.apache.aries.blueprint.container.BlueprintEventDispatcher.callListeners(BlueprintEventDispatcher.java:189)
at org.apache.aries.blueprint.container.BlueprintEventDispatcher.blueprintEvent(BlueprintEventDispatcher.java:140)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:897)
at org.apache.aries.blueprint.container.BlueprintExtender$3.run(BlueprintExtender.java:325)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]

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 module and kie-spring features
JBossFuse:karaf#root> features:install drools-module/6.1.0.Final
JBossFuse:karaf#root> features:install kie-spring/6.1.0.Final
However, when I attempt to install kie-camel I get the following error
JBossFuse:karaf#root> features:install kie-camel/6.1.0.Final
...
Found installed bundle: org.apache.servicemix.specs.jsr311-api-1.1.1 [267]
Found installed bundle: stax2-api [268]
Found installed bundle: org.apache.cxf.cxf-api [400]
Found installed bundle: org.apache.cxf.cxf-rt-management [402]
Installing bundle mvn:org.apache.cxf/cxf-rt-features-clustering/2.6.6
Error executing command: Can not resolve feature:
Unsatisfied requirement(s):
---------------------------
bundle:(&(symbolicname=org.springframework.beans))
Apache CXF Compatibility Bundle J
Any ideas how to resolve this issue? I suspect that I might need to add another feature url but my research into that hasn't produced any results yet.
Thanks in advance
Lewis Watson
I've been in contact with Red Hat support and they have provided me with a way to install version 1.4.0.redhat-63001 of kie-camel
JBossFuse:karaf#root> config:propappend --pid org.ops4j.pax.url.mvn org.ops4j.pax.url.mvn.repositories ',https://maven.repository.redhat.com/techpreview/all/'
JBossFuse:karaf#root> features:addurl mvn:org.drools/drools-karaf-features/6.4.0.Final-redhat-3/xml/features
JBossFuse:karaf#root> features:addurl mvn:org.drools/drools-karaf-features/6.4.0.Final-redhat-3/xml/features
JBossFuse:karaf#root> features:list | grep kie
[uninstalled] [1.4.0.redhat-630011 ] kie-camel
JBossFuse:karaf#root> features:install kie-camel
Things to note about this answer:
It seems to rely on a tech preview maven repository.
I haven't yet been able to develop an OSGI bundle to test the feature.
As a workaround I was able to get something similar working with drool 5.5.0-Final by following what's on https://github.com/FuseByExample/camel-drools-example
Can you try 6.4.0?
features:addUrl mvn:org.drools/drools-karaf-features/6.4.0.Final/xml/features

Upgrade Camel on Servicemix

I've version of servicemix: 4.3.1-fuse-03.01 with Camel 2.6.0-fuse-03-01. I would like to upgrade Camel to version 2.8.0. Is it any easy and SAFE way to do this without upgrading whole Servicemix?
I upgraded the camel in serviceMix 7.0.0.M2 as follows. Related to your ServiceMix version, commands may be vary.
feature:feature:repo-list
you will get list of available repo-urls as an example
standard-4.0.5 |
mvn:org.apache.karaf.features/standard/4.0.5/xml/features
jclouds-1.9.1 |
mvn:org.apache.jclouds.karaf/jclouds-karaf/1.9.1/xml/features
camel-2.16.3 |
mvn:org.apache.camel.karaf/apache-camel/2.16.3/xml/features
feature:repo-add [upgraded_camel_repo_url]
As an example
feature:repo-add mvn:org.apache.camel.karaf/apache-camel/3.16.3/xml/features
feature:feature:repo-list
Should display newly added repo url
feature:list
Should display the upgraded camel version
feature:install [upgraded_camel_name with version]
As an example feature:install camel/2.16.3
Refer http://www.andrejkoelewijn.com/blog/2010/06/15/upgrade-apache-camel-in-servicemix-to-version-2-3-0/ for older servicemix versions

Resources