Hi Experts,
I am trying to generate an excel file using apache POI API and I have included the below jar files in a java project and executed the service and the excel file was successfully created.
commons-codec-1.12.jar
commons-collections4-4.3.jar
commons-compress-1.3.jar
dom4j-1.6.1.jar
poi-3.9-20121203.jar
poi-ooxml-3.9-20121203.jar
poi-ooxml-schemas-3.9-20121203.jar
xmlbeans-3.1.0.jar
But, When I include the same code in webMethods java service, it gives the below error. I searched online and it seems such errors as below will occur when 2 versions of the same .jar files are in the classpath and will conflict.
java.lang.reflect.InvocationTargetException: org.apache.poi.xssf.streaming.SXSSFWorkbook.getSheetAt(I)Lorg/apache/poi/xssf/streaming/SXSSFSheet;
I searched in my SAG Installation Directory for any conflicting poi jar files and it seems it is referred at many other places as well(please refer attached file for details) and I am not sure how I can make my program to use only the .jar files placed inside my package/code/jars directory.
Note: Debugging the java service does not result in any error and the excel file is generated successfully, but running it gives the above error.
Appreciate any help on this.
Regards,
Irfan
POI Jar References.txt (7.13 KB)
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB