Error when using a java action

0
I get the following error when trying to pass a .xlsx file through a string extract java action. java.lang.NoSuchMethodError: org.apache.poi.util.POILogger.log(ILjava/lang/Object;Ljava/lang/Throwable;)V at org.apache.poi.util.DocumentHelper.trySetXercesSecurityManager(DocumentHelper.java:125) at org.apache.poi.util.DocumentHelper.<clinit>(DocumentHelper.java:98) at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:374) at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.<init>(ContentTypeManager.java:100) at org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.<init>(ZipContentTypeManager.java:54) at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:257) at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:774) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:268) at org.apache.tika.parser.pkg.ZipContainerDetector.detectOPCBased(ZipContainerDetector.java:211) at org.apache.tika.parser.pkg.ZipContainerDetector.detectZipFormat(ZipContainerDetector.java:148) at org.apache.tika.parser.pkg.ZipContainerDetector.detect(ZipContainerDetector.java:91) at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:77) at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:112) I have read that the more recent version of POI doesn't use the above class, but then when trying to implement an older version (using eclipse) of POI and its dependencies i get the same error. I think I am doing something wrong but am unsure how to proceed. Any help would be brilliant. Reference (https://stackoverflow.com/questions/10330593/apache-poi-exception-in-reading-xlsx-files
asked
4 answers
3

That method was removed in POI 3.10. It looks like you have a later version of POI in your /userlib folder.

Are you using Excel Import or Excel Exporter from the appstore? Later versions of those modules use POI 3.16, so upgrading any of those modules may have caused this.

answered
2

I know that this is an old thread and it has been answered, but I thought that what I found may be useful to someone.  I noticed this problem also occurs when you run your project locally on Parallels for Mac and your project is stored in a shared folder (\\Mac\).  If you have your project in a folder like C:\Users\UserName\Documents\Mendix\Projectname instead, it works ok.

Gustav

answered
1

Please make sure you have the following jars :

-Poi-3.10-Final.jar
-Poi-ooxml-3.10-Final.jar
-Poi-ooxml-schemas-3.10.jar
-Xmlbeans-2.30.jar

answered
0

You might have duplicate copies of POI in your /userlib folder. They usually get imported when you add app store modules to your project. If you find a duplicate, try removing one of the versions and see if that works, or if it at least throws a different error.

answered