We use Apache POI 3.14 to generate a pptx document from Sling content, using the bundle org.apache.servicemix.bundles.poi.
In a simple standalone Java app, with test code, it works fine.
When we put this code in a bundle and deploy it to Felix, the generated table consists of a single empty cell.
I found a few posts describing a similar problem, some asking to replace poi-ooxml-schemas with ooxml-schemas, but I'm wondering if it would fix our issue as the standalone app works with the same POI bundle than the one deployed to Felix.
This is the code we use:
public static void addTableToSlide(XMLSlideShow ppt, XSLFSlide slide) {
XSLFTable tbl = slide.createTable(1, 1);
for (int i = 0; i < 9; i++) {
XSLFTableRow row = tbl.addRow();
for (int j = 0; j < 9; j++) {
row.addCell();
}
}
tbl.setAnchor(new Rectangle2D.Double(50, 50, 450, 300));
}
And this is what is generated in Felix:
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table">
<a:tbl>
<a:tblPr/>
<a:tblGrid/>
</a:tbl>
</a:graphicData>
What could cause this issue, could it be a conflict between libraries? How could I debug it to find what is wrong in Felix?
This is a classloading issue and a workaround will be available in POI 3.16 - see Bugzilla entry #60226
Furthermore you might want to check #57857 for a servicemix patch.