title: How to configure a system-wide package in osgi?
body: <p>I need to made available a library to some bundles. This library makes use of RMI, so it needs (as far as I know, at least) to use the system class loader in order to work (I tried to "osgi-fy" the library, which results in classcastexceptions at runtime). So what I did was to remove the dependencies from the bundles that use that library, compile them with the library included in the property jars.extra.classpath (in the build.properties of the eclipse project).</p>
  
  <p>Then I added</p>
  
  <pre><code>org.osgi.framework.bootdelegation=com.blipsystems.*
  </code></pre>
  
  <p>in the felix configuration file and started the felix container with the followin command line:</p>
  
  <pre><code>java -classpath lib/blipnetapi.jar -jar bin/felix.jar
  </code></pre>
  
  <p>..which in turns throwed a NoClassDefFoundException for a class of the blipnetapi.jar library:</p>
  
  <pre>
  ERROR: Error starting file:/home/frza/felix/load/BlipnetApiOsgiService_1.0.0.1.jar (org.osgi.framework.BundleException: Activator start error in bundle BlipnetApiOsgiService [30].)
  java.lang.NoClassDefFoundError: com/blipsystems/blipnet/api/util/BlipNetSecurityManager
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      at java.lang.Class.getConstructor0(Class.java:2699)
      at java.lang.Class.newInstance0(Class.java:326)
      at java.lang.Class.newInstance(Class.java:308)
      at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3525)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1694)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1621)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:619)
  Caused by: java.lang.ClassNotFoundException: com.blipsystems.blipnet.api.util.BlipNetSecurityManager
      at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:726)
      at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
      at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1631)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      ... 11 more
  </pre>
  
  <p>So my question is: am I missing something? I did something wrong?</p>