4

I'm using karaf server to deploy and install features.I had install one feature "test-feature" and then I removed it from repository. While activating some other feature it is giving me exception as-

org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=test-feature; type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=test-feature)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"

I have checked all folders of karaf server,so no data is present related to test-feature. So is there any way to clean specific feature related cache or data? TIA

nik
  • 1,464
  • 4
  • 18
  • 32

1 Answers1

4

You have to remove the feature test-feature in karaf before removing it from the feature xml. The error message tells you that karaf expects this feature to be present because you had installed it before.

Basically karaf keeps a list of root requirements which are used to create the whole set of needed bundles at the end. If you do feature:install then you tell karaf to add a feature to this list of root requirements. Karaf always tries to resolve all of these root requirements when you install or uninstall any feature.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • 1
    Thanks.Issue is resolved now, Actually in karaf's cache folder, one of bundle was referencing to test-feature.I have updated its state.json and removed "test-feature" dependancy. Is there any way to remove bundle specific cache while removing that bundle/feature from repository? – nik Feb 10 '18 at 10:07
  • This solved a real needle in the haystack for me! I had a variable in my karaf pom that was causing a blow up when I upgraded versions – E.S. May 12 '21 at 18:20