My Oracle Support Banner

Custom Excel Extract Using Apache POI Stopped Working (Doc ID 3032679.1)

Last updated on JULY 02, 2024

Applies to:

Oracle Financial Services Revenue Management and Billing - Version 5.1.0.0.0 to 6.1.0.0.0 [Release 5.0 to 6.1]
Information in this document applies to any platform.

Goal

On: 5.1.0.0.0 version, ENV - Environment

After upgrade to ORMB 5.1 from ORMB 2901, custom excel extract using Apache POI stopped working, POI jars have dependency on apache-xmlbeans jar which comes with ORMB product.

In 2901 we are using below POI jars:

poi-4.1.2.jar

poi-excelant-4.1.2.jar

poi-ooxml-4.1.2.jar

poi-ooxml-schemas-4.1.2.jar

poi-scratchpad-4.1.2.jar

 

And apache-xmlbeans jar has apache-xmlbeans-3.0.1.jar version which comes with ORMB product.

In 5.1 we are using same POI jars but apache-xmlbeans jar has apache-xmlbeans-4.0.0.jar version which comes with ORMB product.

So while creating worksheet in code POI jars internally refers XmlOptions class of apache-xmlbeans. In 4.0 version of apache-xmlbeans , XmlOptions class don't have put method that is why it is failing where as in apache-xmlbeans-3.0.1.jar it has put method in XmlOptions class.

We tried upgrading to latest version of POI jars i.e.:

poi-5.2.5.jar

poi-excelant-5.2.5.jar

poi-ooxml-5.2.5.jar

poi-scratchpad-5.2.5.jar

poi-ooxml-schemas-4.1.2.jar (this is the latest version)

With these jars it fails with class not found exception for class UnsynchronizedByteArrayOutputStream which come's with commons-io but the commons-io version (commons-io-2.2.jar) we get with 5.1 ORMB product doesn't have this class.

This is kind of dead lock situation, we cannot change jars which are coming with ORMB product and we cannot upgrade POI jars as we need latest version of jars coming with product.

 

Below is code line where it is failing:

XSSFWorkbook workbook = new XSSFWorkbook();

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.