You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Jean-Baptiste MARTIN <jn...@gmail.com> on 2016/03/26 14:25:02 UTC

Camel commands removed in Karaf console when uninstalling feature

Hello,

I'm using Apache ServiceMix 6.1.0, with :

   - Karaf 3.0.5
   - Camel 2.16.1

The issue I'm facing is that when I uninstall a personal feature from
ServiceMix, Camel commands in Karaf console (e.g. route-list) are also
removed.

Steps :

   - Drop feature.xml in /deploy of ServiceMix.

Feature file :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1"
name="my.feature">
    <feature name="my.feature" version="0.0.1-SNAPSHOT"
description="my.feature">
        <bundle>mvn:org.apache.ws.commons.axiom/axiom-api/1.2.15</bundle>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.1</bundle>
        <bundle>mvn:commons-logging/commons-logging/1.2</bundle>
        <bundle>mvn:jaxen/jaxen/1.1.6</bundle>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-stax-api_1.0_spec/1.0.1</bundle>
        <bundle>mvn:org.apache.james/apache-mime4j-core/0.7.2</bundle>
        <bundle>wrap:mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.15</bundle>
        <bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.2.0</bundle>
        <bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.1</bundle>
        <bundle>mvn:com.google.guava/guava/18.0</bundle>
        <bundle>mvn:commons-io/commons-io/2.3</bundle>
        <bundle>wrap:mvn:xerces/xercesImpl/2.11.0</bundle>
        <bundle>wrap:mvn:xml-apis/xml-apis/1.4.01</bundle>
        <bundle>wrap:mvn:xml-resolver/xml-resolver/1.2</bundle>
        <bundle>mvn:org.slf4j/slf4j-api/1.7.12</bundle>
        <bundle>mvn:org.slf4j/slf4j-log4j12/1.7.7</bundle>
    </feature>
</features>


   - Install feature via Karaf console: feature:install my.feature
   - Result of bundle:list | grep -i camel :

136 | Active | 50 | 2.16.1 | camel-core
137 | Active | 50 | 2.16.1 | camel-catalog
139 | Active | 50 | 2.16.1 | camel-jms
140 | Active | 50 | 2.16.1 | camel-spring 141 | Active | 50 | 2.16.1 |
camel-blueprint
142 | Active | 50 | 5.12.1 | activemq-camel
144 | Active | 50 | 6.1.0 | Apache ServiceMix :: ActiveMQ :: Camel
147 | Active | 80 | 2.16.1 | camelcommands-core
148 | Active | 80 | 2.16.1 | camel-karaf-commands
234 | Active | 50 | 2.16.1 | camel-cxf-transport
235 | Active | 50 | 2.16.1 | camel-cxf


   - Remove feature from /deploy folder
   - Result of bundle:list | grep - i camel

136 | Active | 50 | 2.16.1 | camel-core
137 | Active | 50 | 2.16.1 | camel-catalog
139 | Active | 50 | 2.16.1 | camel-jms
140 | Active | 50 | 2.16.1 | camel-spring 141 | Active | 50 | 2.16.1 |
camel-blueprint
142 | Active | 50 | 5.12.1 | activemq-camel
144 | Active | 50 | 6.1.0   | Apache ServiceMix :: ActiveMQ :: Camel
234 | Active | 50 | 2.16.1 | camel-cxf-transport

235 | Active | 50 | 2.16.1 | camel-cxf


We can see that *camel-commands-core* and *camel-karaf-commands* bundles
have also been removed.

   - Logs :

servicemix.log :

2016-03-26 14:12:30,661 | INFO  | mix-6.1.0/deploy | fileinstall
               | 7 - org.apache.felix.fileinstall - 3.5.0 | Installing
bundle feature.xml / 0.0.0
2016-03-26 14:12:30,703 | INFO  | mix-6.1.0/deploy | fileinstall
               | 7 - org.apache.felix.fileinstall - 3.5.0 | Started
bundle: feature:file:/opt/apache-servicemix-6.1.0/deploy/feature.xml
2016-03-26 14:13:12,459 | INFO  | l for user karaf |
FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
- 3.0.5 | Installing feature my.feature 0.0.1-SNAPSHOT
2016-03-26 14:13:53,257 | INFO  | l for user karaf |
FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
- 3.0.5 | Found installed feature camel-core-condition-shell_0_0_0
2.16.1
2016-03-26 14:15:08,811 | INFO  | mix-6.1.0/deploy | fileinstall
               | 7 - org.apache.felix.fileinstall - 3.5.0 |
Uninstalling bundle 237 (feature.xml)
2016-03-26 14:15:08,814 | INFO  | lixDispatchQueue |
FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
- 3.0.5 | Uninstalling feature my.feature 0.0.1-SNAPSHOT
2016-03-26 14:15:08,820 | INFO  | lixDispatchQueue |
FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
- 3.0.5 | Uninstalling feature camel-core-condition-shell_0_0_0 2.16.1
2016-03-26 14:15:08,829 | INFO  | lixDispatchQueue | BlueprintExtender
               | 15 - org.apache.aries.blueprint.core - 1.4.4 |
Destroying BlueprintContainer for bundle
org.apache.camel.karaf.camel-karaf-commands/2.16.1

Would you know why these camel bundles are removed ?

Thanks :)

Re: Camel commands removed in Karaf console when uninstalling feature

Posted by Jean-Baptiste MARTIN <jn...@gmail.com>.
Thanks Jb for your fast answer.

I used the feature:repo-add/feature:install/feature:uninstall commands with
the -v option, trying to see which bundle was causing the error. But it was
not concluding.
So, I removed every bundle dependencies except one. The new feature.xml is :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1"
name="my.feature">
    <feature name="my.feature" version="0.0.1-SNAPSHOT"
description="my.feature">
        <bundle>mvn:com.google.guava/guava/18.0</bundle>
    </feature>
</features>


And the result of the "feature:install -v my.feature" command is :
Installing feature my.feature 0.0.1-SNAPSHOT
Found installed bundle: com.google.guava [128]
Installing feature camel-core-condition-shell_0_0_0 2.16.1
Installing bundle mvn:org.apache.camel/camel-commands-core/2.16.1
Installing bundle mvn:org.apache.camel.karaf/camel-karaf-commands/2.16.1

At this point, I don't understand why Karaf is installing
"camel-commands-core" and "camel-karaf-commands" since there are not
mentioned in "my.feature" file.
Camel commands are usable through Karaf console (there were also usable
before the installation of "my.feature").


And the result of the "feature:uninstall -v my.feature" command is :
Uninstalling feature my.feature 0.0.1-SNAPSHOT
Uninstalling feature camel-core-condition-shell_0_0_0 2.16.1

Same as previously, I'm wondering what is this
"camel-core-condition-shell_0_0_0 2.16.1" and why uninstalling it ?
And Camel commands are not available anymore.
I also tried with <bundle "dependency=true"> attribute but same problem.
I'm a bit confused...


Jb



Le sam. 26 mars 2016 à 17:16, Jean-Baptiste Onofré <jb...@nanthrax.net> a
écrit :

> Hi,
>
> instead of using the deploy folder, can you use
> feature:repo-add/feature:install/feature:uninstall with the -v option to
> see the dependency in cause.
>
> Your feature should also use dependency=true flag on bundle as some
> bundles are already installed by SMX/Camel features (xml-apis, xerces,
> etc).
>
> What's the purpose of your feature as I don't see any of your bundles ?
>
> Regards
> JB
>
> On 03/26/2016 02:25 PM, Jean-Baptiste MARTIN wrote:
> > Hello,
> >
> > I'm using Apache ServiceMix 6.1.0, with :
> >
> >     - Karaf 3.0.5
> >     - Camel 2.16.1
> >
> > The issue I'm facing is that when I uninstall a personal feature from
> > ServiceMix, Camel commands in Karaf console (e.g. route-list) are also
> > removed.
> >
> > Steps :
> >
> >     - Drop feature.xml in /deploy of ServiceMix.
> >
> > Feature file :
> >
> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1"
> > name="my.feature">
> >      <feature name="my.feature" version="0.0.1-SNAPSHOT"
> > description="my.feature">
> >          <bundle>mvn:org.apache.ws
> .commons.axiom/axiom-api/1.2.15</bundle>
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.1</bundle>
> >          <bundle>mvn:commons-logging/commons-logging/1.2</bundle>
> >          <bundle>mvn:jaxen/jaxen/1.1.6</bundle>
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-stax-api_1.0_spec/1.0.1</bundle>
> >          <bundle>mvn:org.apache.james/apache-mime4j-core/0.7.2</bundle>
> >
> <bundle>wrap:mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.15</bundle>
> >
> <bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.2.0</bundle>
> >          <bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.1</bundle>
> >          <bundle>mvn:com.google.guava/guava/18.0</bundle>
> >          <bundle>mvn:commons-io/commons-io/2.3</bundle>
> >          <bundle>wrap:mvn:xerces/xercesImpl/2.11.0</bundle>
> >          <bundle>wrap:mvn:xml-apis/xml-apis/1.4.01</bundle>
> >          <bundle>wrap:mvn:xml-resolver/xml-resolver/1.2</bundle>
> >          <bundle>mvn:org.slf4j/slf4j-api/1.7.12</bundle>
> >          <bundle>mvn:org.slf4j/slf4j-log4j12/1.7.7</bundle>
> >      </feature>
> > </features>
> >
> >
> >     - Install feature via Karaf console: feature:install my.feature
> >     - Result of bundle:list | grep -i camel :
> >
> > 136 | Active | 50 | 2.16.1 | camel-core
> > 137 | Active | 50 | 2.16.1 | camel-catalog
> > 139 | Active | 50 | 2.16.1 | camel-jms
> > 140 | Active | 50 | 2.16.1 | camel-spring 141 | Active | 50 | 2.16.1 |
> > camel-blueprint
> > 142 | Active | 50 | 5.12.1 | activemq-camel
> > 144 | Active | 50 | 6.1.0 | Apache ServiceMix :: ActiveMQ :: Camel
> > 147 | Active | 80 | 2.16.1 | camelcommands-core
> > 148 | Active | 80 | 2.16.1 | camel-karaf-commands
> > 234 | Active | 50 | 2.16.1 | camel-cxf-transport
> > 235 | Active | 50 | 2.16.1 | camel-cxf
> >
> >
> >     - Remove feature from /deploy folder
> >     - Result of bundle:list | grep - i camel
> >
> > 136 | Active | 50 | 2.16.1 | camel-core
> > 137 | Active | 50 | 2.16.1 | camel-catalog
> > 139 | Active | 50 | 2.16.1 | camel-jms
> > 140 | Active | 50 | 2.16.1 | camel-spring 141 | Active | 50 | 2.16.1 |
> > camel-blueprint
> > 142 | Active | 50 | 5.12.1 | activemq-camel
> > 144 | Active | 50 | 6.1.0   | Apache ServiceMix :: ActiveMQ :: Camel
> > 234 | Active | 50 | 2.16.1 | camel-cxf-transport
> >
> > 235 | Active | 50 | 2.16.1 | camel-cxf
> >
> >
> > We can see that *camel-commands-core* and *camel-karaf-commands* bundles
> > have also been removed.
> >
> >     - Logs :
> >
> > servicemix.log :
> >
> > 2016-03-26 14:12:30,661 | INFO  | mix-6.1.0/deploy | fileinstall
> >                 | 7 - org.apache.felix.fileinstall - 3.5.0 | Installing
> > bundle feature.xml / 0.0.0
> > 2016-03-26 14:12:30,703 | INFO  | mix-6.1.0/deploy | fileinstall
> >                 | 7 - org.apache.felix.fileinstall - 3.5.0 | Started
> > bundle: feature:file:/opt/apache-servicemix-6.1.0/deploy/feature.xml
> > 2016-03-26 14:13:12,459 | INFO  | l for user karaf |
> > FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> > - 3.0.5 | Installing feature my.feature 0.0.1-SNAPSHOT
> > 2016-03-26 14:13:53,257 | INFO  | l for user karaf |
> > FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> > - 3.0.5 | Found installed feature camel-core-condition-shell_0_0_0
> > 2.16.1
> > 2016-03-26 14:15:08,811 | INFO  | mix-6.1.0/deploy | fileinstall
> >                 | 7 - org.apache.felix.fileinstall - 3.5.0 |
> > Uninstalling bundle 237 (feature.xml)
> > 2016-03-26 14:15:08,814 | INFO  | lixDispatchQueue |
> > FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> > - 3.0.5 | Uninstalling feature my.feature 0.0.1-SNAPSHOT
> > 2016-03-26 14:15:08,820 | INFO  | lixDispatchQueue |
> > FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> > - 3.0.5 | Uninstalling feature camel-core-condition-shell_0_0_0 2.16.1
> > 2016-03-26 14:15:08,829 | INFO  | lixDispatchQueue | BlueprintExtender
> >                 | 15 - org.apache.aries.blueprint.core - 1.4.4 |
> > Destroying BlueprintContainer for bundle
> > org.apache.camel.karaf.camel-karaf-commands/2.16.1
> >
> > Would you know why these camel bundles are removed ?
> >
> > Thanks :)
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Camel commands removed in Karaf console when uninstalling feature

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

instead of using the deploy folder, can you use 
feature:repo-add/feature:install/feature:uninstall with the -v option to 
see the dependency in cause.

Your feature should also use dependency=true flag on bundle as some 
bundles are already installed by SMX/Camel features (xml-apis, xerces, etc).

What's the purpose of your feature as I don't see any of your bundles ?

Regards
JB

On 03/26/2016 02:25 PM, Jean-Baptiste MARTIN wrote:
> Hello,
>
> I'm using Apache ServiceMix 6.1.0, with :
>
>     - Karaf 3.0.5
>     - Camel 2.16.1
>
> The issue I'm facing is that when I uninstall a personal feature from
> ServiceMix, Camel commands in Karaf console (e.g. route-list) are also
> removed.
>
> Steps :
>
>     - Drop feature.xml in /deploy of ServiceMix.
>
> Feature file :
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1"
> name="my.feature">
>      <feature name="my.feature" version="0.0.1-SNAPSHOT"
> description="my.feature">
>          <bundle>mvn:org.apache.ws.commons.axiom/axiom-api/1.2.15</bundle>
>          <bundle>mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.1</bundle>
>          <bundle>mvn:commons-logging/commons-logging/1.2</bundle>
>          <bundle>mvn:jaxen/jaxen/1.1.6</bundle>
>          <bundle>mvn:org.apache.geronimo.specs/geronimo-stax-api_1.0_spec/1.0.1</bundle>
>          <bundle>mvn:org.apache.james/apache-mime4j-core/0.7.2</bundle>
>          <bundle>wrap:mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.15</bundle>
>          <bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.2.0</bundle>
>          <bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.1</bundle>
>          <bundle>mvn:com.google.guava/guava/18.0</bundle>
>          <bundle>mvn:commons-io/commons-io/2.3</bundle>
>          <bundle>wrap:mvn:xerces/xercesImpl/2.11.0</bundle>
>          <bundle>wrap:mvn:xml-apis/xml-apis/1.4.01</bundle>
>          <bundle>wrap:mvn:xml-resolver/xml-resolver/1.2</bundle>
>          <bundle>mvn:org.slf4j/slf4j-api/1.7.12</bundle>
>          <bundle>mvn:org.slf4j/slf4j-log4j12/1.7.7</bundle>
>      </feature>
> </features>
>
>
>     - Install feature via Karaf console: feature:install my.feature
>     - Result of bundle:list | grep -i camel :
>
> 136 | Active | 50 | 2.16.1 | camel-core
> 137 | Active | 50 | 2.16.1 | camel-catalog
> 139 | Active | 50 | 2.16.1 | camel-jms
> 140 | Active | 50 | 2.16.1 | camel-spring 141 | Active | 50 | 2.16.1 |
> camel-blueprint
> 142 | Active | 50 | 5.12.1 | activemq-camel
> 144 | Active | 50 | 6.1.0 | Apache ServiceMix :: ActiveMQ :: Camel
> 147 | Active | 80 | 2.16.1 | camelcommands-core
> 148 | Active | 80 | 2.16.1 | camel-karaf-commands
> 234 | Active | 50 | 2.16.1 | camel-cxf-transport
> 235 | Active | 50 | 2.16.1 | camel-cxf
>
>
>     - Remove feature from /deploy folder
>     - Result of bundle:list | grep - i camel
>
> 136 | Active | 50 | 2.16.1 | camel-core
> 137 | Active | 50 | 2.16.1 | camel-catalog
> 139 | Active | 50 | 2.16.1 | camel-jms
> 140 | Active | 50 | 2.16.1 | camel-spring 141 | Active | 50 | 2.16.1 |
> camel-blueprint
> 142 | Active | 50 | 5.12.1 | activemq-camel
> 144 | Active | 50 | 6.1.0   | Apache ServiceMix :: ActiveMQ :: Camel
> 234 | Active | 50 | 2.16.1 | camel-cxf-transport
>
> 235 | Active | 50 | 2.16.1 | camel-cxf
>
>
> We can see that *camel-commands-core* and *camel-karaf-commands* bundles
> have also been removed.
>
>     - Logs :
>
> servicemix.log :
>
> 2016-03-26 14:12:30,661 | INFO  | mix-6.1.0/deploy | fileinstall
>                 | 7 - org.apache.felix.fileinstall - 3.5.0 | Installing
> bundle feature.xml / 0.0.0
> 2016-03-26 14:12:30,703 | INFO  | mix-6.1.0/deploy | fileinstall
>                 | 7 - org.apache.felix.fileinstall - 3.5.0 | Started
> bundle: feature:file:/opt/apache-servicemix-6.1.0/deploy/feature.xml
> 2016-03-26 14:13:12,459 | INFO  | l for user karaf |
> FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> - 3.0.5 | Installing feature my.feature 0.0.1-SNAPSHOT
> 2016-03-26 14:13:53,257 | INFO  | l for user karaf |
> FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> - 3.0.5 | Found installed feature camel-core-condition-shell_0_0_0
> 2.16.1
> 2016-03-26 14:15:08,811 | INFO  | mix-6.1.0/deploy | fileinstall
>                 | 7 - org.apache.felix.fileinstall - 3.5.0 |
> Uninstalling bundle 237 (feature.xml)
> 2016-03-26 14:15:08,814 | INFO  | lixDispatchQueue |
> FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> - 3.0.5 | Uninstalling feature my.feature 0.0.1-SNAPSHOT
> 2016-03-26 14:15:08,820 | INFO  | lixDispatchQueue |
> FeaturesServiceImpl              | 20 - org.apache.karaf.features.core
> - 3.0.5 | Uninstalling feature camel-core-condition-shell_0_0_0 2.16.1
> 2016-03-26 14:15:08,829 | INFO  | lixDispatchQueue | BlueprintExtender
>                 | 15 - org.apache.aries.blueprint.core - 1.4.4 |
> Destroying BlueprintContainer for bundle
> org.apache.camel.karaf.camel-karaf-commands/2.16.1
>
> Would you know why these camel bundles are removed ?
>
> Thanks :)
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com