rrakhi
9 years agoVisitor
Ready API Maven Plugin causes error when reading Excel file within Groovy script using Apache POI
I have added the ready-api-maven-plugin 1.7 version with pom.xml for Maven2 integration.
<dependencies> <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> <version>0.9.9-RC1</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.13</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.13</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> <version>3.13</version> <scope>compile</scope> </dependency> </dependencies>
<plugin>
<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>1.7.0</version>
</plugin>
Within my ReadyAPI project I have a writen a Groovy script that reads an Excel file using Apache POI libraries.
This project run perfectly fine with Ready API but when integrating with Maven and using pom.xml, I see the below error.
23:53:01,058 ERROR [SoapUI] An error occurred [org/openxmlformats/schemas/spreadsheetml/x2006/main/CTExtensionList], see error log for details java.lang.NoClassDefFoundError: org/openxmlformats/schemas/spreadsheetml/x2006/main/CTExtensionList at java.lang.Class.getDeclaredMethods0(Native Method)
Removed the Groovy code that reads the Excel file and all was good with Maven integration.
I need to read the excel file for some processing and hence need the issue resolved when using Maven and Ready API integration.
Looks like ready-api-maven-plugin seems to have some conflict with apache poi libraries.
Note: adding the ooxml-schemas dependency within pom.xml didn't help either.
Appreciate all help.