title: Apache POI, Excel 2007+ XML, and OSGI
body: <p>For a project I'm trying to get Excel XML functionality using Apache POI to work with OSGI. </p>
  
  <p>I've tried the POI ServiceMix bundle, but this was missing the ooxml-schemas jar. Adding the jar to the bundle and including it in the manifest didn't seem to work.</p>
  
  <p>Then I tried to creating wrapper bundles for POI 3.10, but also to no avail. Same error.</p>
  
  <pre><code>Caused by: java.lang.ClassNotFoundException: org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl not found by org.apache.poi [8]
  at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
  at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
  at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  ... 105 more
  </code></pre>
  
  <p>Subsequent calls lead to the following:</p>
  
  <pre><code>Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument
  at org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument$Factory.parse(Unknown Source)
  at org.apache.poi.xssf.model.ThemesTable.&amp;lt;init&amp;gt;(ThemesTable.java:44)
  ... 93 more
  </code></pre>
  
  <p>XMLBeans is available as a bundle exporting all of its packages, and I've tried the ServiceMix bundle as well as making one out of the jar included with POI 3.10.</p>
  
  <p>Could someone guide me through the process of creating a working OSGI bundle that can handle Excel 2007+ XML documents? Help much appreciated.</p>