The problem was resolved. Bellow solution. It looks like the Integration Server is not compatible with the newest version of Apache POI>5.x
And
import org.apache.poi.ss.usermodel.Workbook;
doesn’t work and couldn’t be initialized.
I changed the version of Apache POI to 4.1.2 and changed way to read Excel file like below:
File inputFile = new File(fileName);
StringBuffer data = new StringBuffer();
try {
FileOutputStream fos = new FileOutputStream(outputFile);
XSSFWorkbook wBook = new XSSFWorkbook(new FileInputStream(inputFile));
XSSFSheet sheet = wBook.getSheetAt(0);
Row row;
Cell cell;
Iterator<Row> rowIterator = sheet.iterator();
while (rowIterator.hasNext()) {
// For each row, iterate through each columns
}
Glad to know it was resolved.
But Integration Server functions as a platform and by itself isn’t likely to have compatibility issues with specific libraries. Might make sense to confirm the java versions are same in intellij and the Integration Server , the incompatibility could be with versions of java.
An InvocationTargetException is a wrapper to another exception, you can also check the underlying exception by expanding the stacktrace in the IntegrationServer Error Logs, if you would like to pursue this.
@Mark_Kpc , did you test the new POI library with the package class loader setting? Because the symptoms you describe are extremely typical for such a scenario.
All the other posts aside, I would encourage you that if at all possible that you DO NOT use .xlsx as a transport format. Using POI is okay and all but experience has shown that using Excel formats in this manner is fragile. Relatively easy to break the integration just because a user edited a workbook and to them looks “correct.”