|Summary:||ClassLoader workaround for OSGI when processing OOXML files|
|Product:||POI||Reporter:||Andreas Beeker <kiwiwings>|
|Component:||POI Overall||Assignee:||POI Developers List <dev>|
Description Andreas Beeker 2016-10-08 17:03:29 UTC
When using OSGI, the (current thread) context classloader might not see the xmlbeans definition files (*.xsb), which results in either loading errors or undefined behavior (e.g. the written file doesn't contain xml elements). To workaround this, the new method POIXMLTypeLoader.setClassLoader needs to be called before OOXML files are processed - and it's good style to null it, after the calling code/thread is exiting. Beside this patch, there will be a new servicemix patch in #57857 which still needs to be adapted when POI 3.16 is out. This has been tested and validated in Apache Felix/Sling.