Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
271 views
in Technique[技术] by (71.8m points)

java - Unable to resolve root: missing requirement [root] osgi.identity

I am working to run Java Project on Karaf.

Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; 
osgi.identity=karcin-insight; 
type=karaf.feature; 
version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
filter:="(&(osgi.identity=karcin-insight)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))" [caused by: Unable to resolve karcin-insight/1.0.0.SNAPSHOT: missing requirement [karcin-insight/1.0.0.SNAPSHOT] osgi.identity; 
osgi.identity=karcin-insight-bundles; 
type=karaf.feature [caused by: Unable to resolve karcin-insight-bundles/1.0.0.SNAPSHOT: missing requirement [karcin-insight-bundles/1.0.0.SNAPSHOT] osgi.identity; 
osgi.identity=karcin-insight-rest; type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
resolution:=mandatory [caused by: Unable to resolve karcin-insight-rest/1.0.0.SNAPSHOT: missing requirement [karcin-insight-rest/1.0.0.SNAPSHOT] osgi.wiring.package; 
filter:="(osgi.wiring.package=tr.com.karcin.license)"]]]

How can i fix.?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I agree that these error messages are not that easy to read. There are too many [...] parentheses. But with little practice, it can be reformatted (in mind) to:

Unable to resolve root:
  missing requirement [root]
   - osgi.identity;
   - osgi.identity=karcin-insight;
   - type=karaf.feature; 
   - version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]";
   - filter:="(&(osgi.identity=karcin-insight)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
  [caused by:
    Unable to resolve karcin-insight/1.0.0.SNAPSHOT:
      missing requirement [karcin-insight/1.0.0.SNAPSHOT]
       - osgi.identity; 
       - osgi.identity=karcin-insight-bundles; 
       - type=karaf.feature
    [caused by:
      Unable to resolve karcin-insight-bundles/1.0.0.SNAPSHOT:
        missing requirement [karcin-insight-bundles/1.0.0.SNAPSHOT]
         - osgi.identity; 
         - osgi.identity=karcin-insight-rest;
         - type=osgi.bundle;
         - version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
         - resolution:=mandatory
      [caused by:
        Unable to resolve karcin-insight-rest/1.0.0.SNAPSHOT:
          missing requirement [karcin-insight-rest/1.0.0.SNAPSHOT]
           - osgi.wiring.package; 
           - filter:="(osgi.wiring.package=tr.com.karcin.license)"
      ]
    ]
  ]

So you have a chain of resolution problems:

  • root feature
  • karcin-insight/1.0.0.SNAPSHOT feature
  • karcin-insight-bundles/1.0.0.SNAPSHOT feature
  • karcin-insight-rest/1.0.0.SNAPSHOT bundle (because of osgi.wiring.package namespace)

So what is missing is that karcin-insight-rest bundle has Import-Package: tr.com.karcin.license, but you didn't install any bundle that has the same package in Export-Package.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...