The org.apache.felix.gogo.commands missing requirement while installing a featue

56 views Asked by At

I'm using Karaf 4.2.16. I want to install a feature: karaf@mst-ica()> feature:install my_feature.config and get the following error:

Unable to resolve root: 
    missing requirement [root] osgi.identity; 
    osgi.identity=my_feature.config; 
    type=karaf.feature; 
    version="[4.0.0.SNAPSHOT,4.0.0.SNAPSHOT]"; 
    filter:="(&(osgi.identity=my_feature.config)(type=karaf.feature)(version>=4.0.0.SNAPSHOT)(version<=4.0.0.SNAPSHOT))" 
    [
        caused by: Unable to resolve my_feature.config/4.0.0.SNAPSHOT: 
        missing requirement [my_feature.config/4.0.0.SNAPSHOT] osgi.identity; 
        osgi.identity=my_feature.commands; 
        type=osgi.bundle; 
        version="[4.0.0.SNAPSHOT,4.0.0.SNAPSHOT]"; 
        resolution:=mandatory 
        [
            caused by: Unable to resolve my_feature.commands/4.0.0.SNAPSHOT: 
                missing requirement [my_feature.commands/4.0.0.SNAPSHOT] osgi.wiring.package; 
                filter:="(&(osgi.wiring.package=org.apache.felix.gogo.commands)(version>=0.17.0)(!(version>=1.0.0)))"
        ]
    ]

I'm using Equinox as a system framework:

karaf@mst-ica()> system:framework
Current OSGi framework is equinox

However, it was not a problem with Karaf 2.2.0 and my feature I'm trying to install was working fine.

What can I do to have Felix gogo commands available? Do I need to install a specific feature first?

1

There are 1 answers

0
Ubuntu Learner On

The problem was fixed. As mentioned in Update Notes (from 2.x to 3.x), org.apache.felix.gogo.commands was replaced with org.apache.karaf.shell.commands.

In term of development, the previously shell anotations provided by the org.apache.felix.gogo.commands* package (@Command, @Argument, etc) are now deprecated. Apache Karaf 3.0.0 still supports these annotations, but we encourage the users to upgrade to the new package org.apache.karaf.shell.commands.

I have changed my pom file and Java imports and rebuilt the feature. Also, I have installed shell-compat using karaf@mst-ica()> feature:install shell-compat.

After all of that had been done, I was able to install my feature with no errors.