Showing results for 
Search instead for 
Did you mean: 

Handling POIXML Exception in Groovy Scripting

Occasional Contributor

Re: Handling POIXML Exception in Groovy Scripting

Hi JHunt, Sorry for delayed reply.

Tried it using your script too but it does not work. XLSX file is just two row data. Could you please try to read data in groovy script as test step in soapUI from attached sheet.

SOAP UI - 5.5.0


Added error log from error output: Not sure if it has something to have with jars placed inside ext and lib folder. Can you share your jars for soap in ext and lib. Thanks 


  • Thu Aug 08 11:05:09 IST 2019:ERROR:org.apache.poi.ooxml.POIXMLException: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
  • org.apache.poi.ooxml.POIXMLException: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
  • at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(
  • at
  • at org.apache.poi.ooxml.POIXMLDocument.load(
  • at org.apache.poi.xssf.usermodel.XSSFWorkbook.(
  • at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(
  • at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(
  • at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  • at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  • at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  • at java.lang.reflect.Method.invoke(Unknown Source)
  • at
  • at
  • at
  • at
  • at$ Source)
  • at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(
  • at
  • at
  • at
  • at
  • at
  • at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$
  • at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  • at java.util.concurrent.ThreadPoolExecutor$ Source)
  • at Source)
  • Caused by: java.lang.reflect.InvocationTargetException
  • at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  • at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  • at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  • at java.lang.reflect.Constructor.newInstance(Unknown Source)
  • at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(
  • at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(
  • ... 24 more
  • Caused by: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
  • at org.apache.poi.ooxml.POIXMLTypeLoader.(
  • at org.apache.poi.xssf.model.ThemesTable.(
  • ... 30 more




Community Hero

Re: Handling POIXML Exception in Groovy Scripting

Your Groovy scripts run in the same JVM as SoapUI.


SoapUI has a dependency on XmlBeans 2.4.0 and loads this before the JARs in bin/ext/, but poi-ooxml-schemas (the latest version) has a dependancy on XmlBeans 3.1.0.


You could try using Apache POI 3.9 because it is looking for XmlBeans 2.3.0 and is more likely to work with SoapUI's version (no guarantees).

New Here?
Join us and watch the welcome video:
Top Kudoed Authors