I am not an experienced OSGi user yet and I get some problems consequently.
I am trying to use org.apache.servicemix.bundles.hadoop-client as an external hadoop provider because I don't want my bundle to contain all of those classes.
But when I run the set of bundles (my and org.apache.servicemix.bundles.hadoop-client) I get the following error:
ERROR: Bundle org.apache.servicemix.bundles.hadoop-client [56] Error starting file:bundles/org.apache.servicemix.bundles.hadoop-client_2.8.1.1.jar (org.osgi.framework.BundleException: Unable to resolve org.apache.servicemix.bundles.hadoop-client [56](R 56.0): missing requirement [org.apache.servicemix.bundles.hadoop-client [56](R 56.0)] osgi.wiring.package; (&(osgi.wiring.package=corg.osgi.framework.BundleException: Unable to resolve org.apache.servicemix.bundles.hadoop-client [56](R 56.0): missing requiremom.google.inject)(version>=3.0.0)(!(version>=4.0.0))) Unresolved requirements: [[org.apache.servicemix.bundles.hadoop-client [56ent [org.apache.servicemix.bundles.hadoop-client [56](R 56.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.inject)(ve](R 56.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.inject)(version>=3.0.0)(!(version>=4.0.0)))]) rsion>=3.0.0)(!(version>=4.0.0))) Unresolved requirements: [[org.apache.servicemix.bundles.hadoop-client [56](R 56.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.inject)(version>=3.0.0)(!(version>=4.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111) at org.apache.felix.framework.Felix.startBundle(Felix.java:2117) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.lang.Thread.run(Thread.java:748)
I understand that org.apache.servicemix.bundles.hadoop-client imports com.google.inject and expects that some other bundle exports it.
My own bundle imports com.google.inject as well and it works properly. The only difference is that my bundle uses version 3.0 and hadoop wants 4.0.
Both of the com.google.inject 3.0 and 4.0 bundles are in the osgi_container/bundles folder.
I've even tried to force my bundle to <export-package> com.google.inject and it "worked". The error began to ask for another library. </stupid attemtps>
So I'm stuck at the point. Thanks for any advice.