Apache POI are listed as non-excludable libraries, so you can’t replace these libraries.
The Exclude built-in libraries feature allows you to remove built-in libraries stored in the .classpath file of a project folder. This feature applies to all libraries in the .classpath file, excluding the following:
My existing script for reading and writing XLSX files is encountering issues with Apache POI 3.17. While it used to function correctly, the test environment has undergone an upgrade, leading to the problem. I attempted to address this by switching to POI 4.1.2, and the script runs smoothly. However, there are some error using existing Katalon features due to compatibility issue I think
I believe, the POI v3.17 provides enough API to read / write XLSX files. Therefore I suppose you would be able to write your custom keyword operational on the POI v3.17. Any reason you need v4.1.2?
I encountered error as the following when using excel related action; on developer end, they believe that its due to old POI version that we are using
Reason:
org.codehaus.groovy.runtime.InvokerInvocationException: java.io.IOException: Failed to read zip entry source
at DateConversion.invokeMethod(DateConversion.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
at S10_TC001 - Create Global Parts (Admin).run(S10_TC001 - Create Global Parts (Admin):47)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:144)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1700701915485.run(TempTestCase1700701915485.groovy:25)
Caused by: java.io.IOException: Failed to read zip entry source
at org.apache.poi.openxml4j.opc.ZipPackage.(ZipPackage.java:103)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:324)
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:295)
at copyToExcel.exel2(copyToExcel.groovy:51)
at DateConversion.invokeMethod(DateConversion.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
at Script1692168280247.run(Script1692168280247.groovy:47)
… 11 more
Caused by: java.util.zip.ZipException: invalid entry size (expected 0 but got 1711 bytes)
at org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream.read(ZipSecureFile.java:220)
at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource$FakeZipEntry.(ZipInputStreamZipEntrySource.java:132)
at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.(ZipInputStreamZipEntrySource.java:56)
at org.apache.poi.openxml4j.opc.ZipPackage.(ZipPackage.java:100)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:324)
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:295)
at copyToExcel.exel2(copyToExcel.groovy:51)
at DateConversion.invokeMethod(DateConversion.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
at S10_TC001 - Create Global Parts (Admin).run(S10_TC001 - Create Global Parts (Admin):47)
… 11 more
Anyway, it seems you need a newer version of POI to read the XLSX file. But Katalon Studio does not allow you to. Therefore, no way you have. Perhaps you want to quit using Katalon Studio and find something else.
Or, you have a final workaround: you want to create a CSV file from the XLSX file, and pass the CSV to KS.
I’d also like to add some input to this post and request an update to POI (I’ve also submitted a support ticket).
We’re currently using KS 9.7.4 and cannot update to 10.x due to Desktop testing which WAD isn’t supported for in 10.x and waiting on Katalons solution to that…there was a CVE report ( CVE Record: CVE-2025-31672) released recently that indicates vulnerabilities in Apache POI prior to version 5.4.X and recomends updating to 5.4.0 at a min to clear that vulnerability.
Our cyber team has flagged this vulnerability and wants it patched. They’ve indicated that the 10.x series does not have this vulnerability, although, as mentioned due to desktop testing, updating to 10.x is not currently an option for us.