Forum Discussion

BrennaLanhart's avatar
New Contributor
6 years ago

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.



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(
at org.apache.poi.ooxml.POIXMLDocument.load(
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory$ Source)
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(
... 14 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader
at org.apache.poi.xssf.model.ThemesTable.<init>(
... 20 more