0 Replies Latest reply on Aug 15, 2012 9:50 AM by Ashok Mollin

    Issue loading dependent bundle - net.sf.json-lib

    Ashok Mollin Newbie

      Hello there,

       

      We would like to go with FAB deployment.  The project has been created as per FAB template (http://fusesource.com/docs/esbent/7.0/esb_deploy_osgi/BuildFab-Archetypes.html) and we have updated pom.xml with specific dependencies.<br

       

      Our code depends on net.sf.json-lib jar, which in turn depends on 3 other jars.  All these jars are in local Maven Repository (downloaded via mvn install step in building the project).

       

      However, when application bundle is started we get the following error:

       

      -bash-4.1$ ./karaf

      Please wait while Fuse ESB is loading...

      ERROR: Bundle power-rs Error starting file:/dpz/usr/local/FuseESBEnterprise-7.0.0/deploy/power-rs.fab (org.osgi.framework.BundleException: Unresolved constraint in bundle power-rs : Unable to resolve 305.0: missing requirement osgi.wiring.package; (&(osgi.wiring.package=net.sf.json)(version>=2.4.0)(!(version>=3.0.0))))

      org.osgi.framework.BundleException: Unresolved constraint in bundle power-rs : Unable to resolve 305.0: missing requirement osgi.wiring.package; (&(osgi.wiring.package=net.sf.json)(version>=2.4.0)(!(version>=3.0.0)))

              at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3903)

              at org.apache.felix.framework.Felix.startBundle(Felix.java:1890)

              at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1213)

              at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)

              at java.lang.Thread.run(Thread.java:662)

       

      This (http://thecarlhall.wordpress.com/2012/01/19/understanding-the-unresolved-constraint-missing-resource-message-from-apache-felix/) URL has a similar/related problem and solution documented.

       

      We don't come across the above error, if we install net.sf.json-lib manually in karaf console using "install -s mvn..." command.

       

      So the issue is with application bundle able to load its dependencies on start.

       

      Please advise what could be wrong here.

       

      Thank you,

      Ashok

       

      Edited by: amollin on Aug 15, 2012 1:45 PM

       

      Edited by: amollin on Aug 15, 2012 1:48 PM