at org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTFontsImpl.getFontArray(CTFontsImpl.java:71)
at org.apache.poi.xssf.model.StylesTable.readFrom(StylesTable.java:210)
at org.apache.poi.xssf.model.StylesTable.<init>(StylesTable.java:138)
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:61)
at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:660)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:165)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:278)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:118)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.create(XSSFWorkbookFactory.java:98)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.create(XSSFWorkbookFactory.java:36)
at org.apache.poi.ss.usermodel.WorkbookFactory.lambda$create$2(WorkbookFactory.java:199)
at org.apache.poi.ss.usermodel.WorkbookFactory.wp(WorkbookFactory.java:295)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:199)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:163)
at com.kms.katalon.core.testdata.reader.WorbookProvider.getExcelData(WorbookProvider.java:24)
at com.kms.katalon.core.testdata.reader.ExcelFactory.getExcelData(ExcelFactory.java:31)
at com.kms.katalon.core.testdata.reader.ExcelFactory.getExcelDataWithDefaultSheet(ExcelFactory.java:17)
at com.kms.katalon.core.testdata.TestDataFactory.readExcelData(TestDataFactory.java:224)
at com.kms.katalon.core.testdata.TestDataFactory.internallyfindTestData(TestDataFactory.java:150)
at com.kms.katalon.core.testdata.TestDataFactory.findTestData(TestDataFactory.java:130)
at com.kms.katalon.core.testdata.TestDataFactory$findTestData.callStatic(Unknown Source)
at Smoke Users Setup.run(Smoke Users Setup:24)
Error-2: Reading Excel file using Excel Keywords plugin
at org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTNumFmtsImpl.getNumFmtArray(CTNumFmtsImpl.java:71)
at org.apache.poi.xssf.model.StylesTable.readFrom(StylesTable.java:201)
at org.apache.poi.xssf.model.StylesTable.<init>(StylesTable.java:138)
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:61)
at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:660)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:165)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:278)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:299)
at com.kms.katalon.keyword.excel.ExcelKeywords.getWorkbook(ExcelKeywords.groovy:115)
at com.kms.katalon.keyword.excel.ExcelKeywords$getWorkbook.call(Unknown Source)
at Excel Update.run(Excel Update:28)
The error message means you do not have a correct pathway to your method, “getWorkbook()” or you have not spelled the method name correctly. As @Dave_Evers has noted, we need more information to assist you beyond that. Personally, I think you need the Object that the method, “getWorkbook()”, is associated with as it is likely NOT a local method (i.e. in the Test Case you are running).
This name reminds me of a previous discussion years ago:
I guess, you have some version conflict on XML processing libraries.
I guess, in the classpath in the azure pipeline, you have some jar file(s) that causes this error.
I just guess (I am not very sure), you might have a newer version of Apache Xercess (XML Parser) in the azure classpath which has the higher precedene to the Xercess jar bundled in Katalon Studio. Katalon Studio v8.6.x bundles very old version of Apache POI library, which is quite likely causes version conflicts with newer version of external libs like Xerces.
It is impossible for me to investigate further a problem caused by jar’s version conflict remotely.
If my guess is right, I think you would not be able to use Excel as data file for Katalon Tests in the Azure pipeline. Alternatively you could convert the Excel into CSV text manually. You want to use the CSV as input source for Katalon tests. Processing CSV would not involve any XML libraries. You would be able to workaround the original error.
I myself have a doubt about my guess above.
I assumed that the process of Katalon Runtime Engine and the process of Azure Pipeline both run in a single Java VM sharing a single classpath.
This is unlikely. If this is the case, it’s too stupid.
I guess Azure pipeline should be able to fork a dedicated process for Katalon Runtime Engine so that no collision of jar versions should occur.
Hi,
Thanks for your suggestions. I too guess the same and tried to change/ import the poi versions from Katalon library management. But I didn’t find there any option.
And Yes, I have existing azure builds for dev and azure agent machines. Using the same env.
I will try to check with CSV file, but I have xlsx with multiple tabs. So I need to modify my scripts.
Also I will try with new version of Katalon runtime engine (if available v9)
I guess you use Maven@3 task in your Azure Pipeline to run Katalon Runtime Engine. In your azure-pipeline.yml you would have a section that specifies various parameters to the Maven@3 task. Among others there is a parameter named jdkVersionOption.
Which value do you specify for jdkVersionOption?
Katalon products of the current version v8.6.* requires JDK 1.8.
Therefore in the YAML you should specify
jdkVersionOption: '1.8'
JDK bundles the Apache Xerces library ever since JDK SE 5 (19 years ago). JDK 8 bundles certain version of Xerces with whch Katalon products depend on. JDK 11 bundles newer Xerces, JDK 17 bundles even newer one. If you specify 1.11 or leave it as default in the YAML, I suppose, KRE would fail. It is quite likely that your test emits a strange message like
Thanks @kazurayam
I found the exact issue and it is solved. The project is having some external jars which results conflicts with internal jars. i removed them and working fine now.