cancel
Showing results for 
Search instead for 
Did you mean: 

POIXMLTypeLoader Error when trying to write to XLSX file

New Contributor

POIXMLTypeLoader Error when trying to write to XLSX file

I have been trying to develop a groovy script to write to an xlsx fiel and I am trying to use APache POI to do that. I have attached my script (I have played around with every variation of this that I can think of, so it not very pretty right now). I have also included all Apache POI files in the lib folder for ReadyAPI and I have checked my buildpath and deleted any old references and any old version of the POI jars. I still keep getting the following error after everything I have tried.

 

Error:

Tue Apr 09 15:32:51 MST 2019: ERROR: org.apache.poi.ooxml.POIXMLException: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader
org.apache.poi.ooxml.POIXMLException: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:66)
at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:657)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:180)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:282)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:88)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:116)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory$createWorkbook.call(Unknown Source)
at Script1.run(Script1.groovy:19)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:98)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:158)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:331)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown 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(XSSFFactory.java:56)
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:63)
... 14 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader
at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:86)
... 20 more

1 REPLY 1
Super Contributor

Re: POIXMLTypeLoader Error when trying to write to XLSX file

You are missing xmlbeans-2.3.0.jar file in soapui/home/ext folder.

https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans/2.3.0

New Here?
Join us and watch the welcome video:
Watch the New Interview
7Mistakes
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win