Contributions
ERROR:org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
fis = new FileInputStream(new File(testDataFilePath)); workbook = new XSSFWorkbook(fis); sheet = workbook.getSheet(testCaseName); Here are the list of jars which i have used: ooxml-schemas-1.3.jar poi-3.9.jar poi-examples-3.9.jar poi-excelant-3.9.jar poi-ooxml-3.9.jar poi-ooxml-schemas-3.9.jar poi-scratchpad-3.9.jar xmlbeans-2.6.0.jar I am getting this in SOAPUI error log. on workbook line. Mon Jun 05 01:32:29 IST 2017:ERROR:org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62) at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403) at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:207) 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.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190) at Script2.run(Script2.groovy:30) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:90) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:250) 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:60) ... 17 more Caused by: java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader at org.openxmlformats.schemas.spreadsheetml.x2006.main.StyleSheetDocument$Factory.parse(Unknown Source) at org.apache.poi.xssf.model.StylesTable.readFrom(StylesTable.java:121) at org.apache.poi.xssf.model.StylesTable.<init>(StylesTable.java:92) ... 22 moreSolved32KViews0likes1CommentHow to find the elements in request xml and assigning the values to them. Not able to do it.
Hi, I am using free version of SOAPUI, and trying to read the data from excel sheet. Here is format of excel sheet: A B C Data3 Data4, Data5 Id,1234 timestamp,2016-11-21T20:29:12.664Z sourceId,DEV Id,1234 timestamp,2016-11-21T20:29:12.664Z sourceId,TES Where id, timestamp and sourceId are nodes in soap request, and followed by values separated by comma. Sothat I do not need to change the structure of request xml, if I don’t want to provide one of the element in the request. I am able to fetch the data from the excel sheet and assigning them to two variables named reqTagName(id,timestamp, sourceid) and reqTagValue(123, 2016-11-21T20:29:12.664Z ,DEV). Problem: I am not able to find the fetched nodes in sample request(which is my next test step) and assigning the respective fetched values (replacing the ? from the value). Or I want to assign the fetched values in fetched nodes in the next step, which is my sample soap request. Sample of req xml nodes: <id>?</id> < timestamp >?</ timestamp > < sourceId >?</ sourceId > Next part I am able to do which is removing the elements where there is no value.482Views0likes0Comments