3 Replies Latest reply on Feb 27, 2013 8:25 PM by Freeman(Yue) Fang

    Issue using commons-vfs2 in Karaf

    Constantine Vasilyev Newbie



      I am porting legacy code to OSGi. The code has dependencies on Apache commons-vfs2 and craft. I had configured my feature to include the following:



      When I tried to install the feature in Karaf, I got an error telling me that commons-vfs2 required a missing import for jackrabbit libraries.  I have added the following:



      Now I am getting the following error:


      Error executing command: Could not start bundle mvn:org.apache.jackrabbit/jackrabbit-bundle/2.6.0 in feature(s) my-bundle-2.0-SNAPSHOT: The bundle "org.apache.jackrabbit.jackrabbit-bundle_2.6.0 [220]" could not be resolved. Reason: Missing Constraint: Import-Package: com.ibm.db2.jcc; version="0.0.0"


      It seems strange that "com.ibm.db2.jcc" is required and not optional for jackrabbit. My question: how can I make my application work in Karaf if it requires commons-vfs2? Perhaps I can install a different version of VFS? I don't see the way for me to instruct karaf to ignore certain imports that are inside the jackrabbit manifest. Or, perhaps, there is a feature available in Karaf out of the box that would allow me to load VFS?