My goal is to create an Excel 2007 document (.xlsx) in an Eclipse RCP environment (Excel 2003 is simple). I do not want to place POI banners inside the / lib folder , instead I want to use the OSGI package for POI from my target definition.
All my attempts so far have not been able to create a working package OSGI POI 3.8 . What i have done so far:
I combined all the relevant JAR files with the Ant zip task :
- poi-3.8-beta3-20110606.jar
- poi-OOXML-3,8-beta3-20110606.jar
- poi-ooxml-scheme-3.8-beta3-20110606.jar
- poi-notepad-3,8-beta3-20110606.jar
I ran the bnd tool with the wrap parameter:java -jar biz.aQute.bnd.jar wrap ./poi-3.8-beta3-20110606-merged.jar
I had to bind the banks in the / ooxml -lib folder separately, using bnd:
- XMLBeans-2.3.0.jar
- Stax-api-1.0.1.jar
- dom4j-1.6.1.jar
This results in ClassNotFoundExceptions for org.w3c.dom.Node, because xmlbeans-2.3.0.jar exports four classes from this package org.w3c.dom. Typically, JavaSE-RuntimeEnvironment exports these files.
I deleted the folder org/w3c/domfrom xmlbeans-2.3.0.jar and rebuilt the jar, but I have other ClassNotFoundExceptions.
I got here. I think working with bnd wrap is not enough. Maybe I should create a bnd.properties file and have explicit Export-Package / Import-Package instructions, but which ones work?
So, did anyone successfully create the POI 3.8 OSGI work package?
source
share