Excel importer not working in 7.5.1?

1
Hi, just imported the latest Excel importer from the appstore in my 7.5.1 app.   Did clean my deployment directory...   I get a java compile error:   Buildfile: C:\Users\spl\Documents\Mendix\Schedule Tracker-main\deployment\build_core.xml compile:     [javac] Compiling 204 source files to C:\Users\spl\Documents\Mendix\Schedule Tracker-main\deployment\run\bin     [javac] C:\Users\spl\Documents\Mendix\Schedule Tracker-main\javasource\excelimporter\reader\readers\ExcelReader.java:127: error: incompatible types: try-with-resources not applicable to variable type     [javac]                                 POIFSFileSystem poifs = new POIFSFileSystem(content);     [javac]                                                 ^     [javac]     (POIFSFileSystem cannot be converted to AutoCloseable)     [javac] C:\Users\spl\Documents\Mendix\Schedule Tracker-main\javasource\excelimporter\reader\readers\ExcelReader.java:184: error: incompatible types: try-with-resources not applicable to variable type     [javac]                 try (POIFSFileSystem poifs = new POIFSFileSystem(content);     [javac]                                      ^     [javac]     (POIFSFileSystem cannot be converted to AutoCloseable)     [javac] C:\Users\spl\Documents\Mendix\Schedule Tracker-main\javasource\excelimporter\reader\readers\ExcelReader.java:405: error: incompatible types: try-with-resources not applicable to variable type     [javac]                                 POIFSFileSystem poifs = new POIFSFileSystem(content);     [javac]                                                 ^     [javac]     (POIFSFileSystem cannot be converted to AutoCloseable)     [javac] C:\Users\spl\Documents\Mendix\Schedule Tracker-main\javasource\excelimporter\reader\readers\ExcelReader.java:419: error: incompatible types: try-with-resources not applicable to variable type     [javac]                                 POIFSFileSystem poifs = new POIFSFileSystem(content);     [javac]                                                 ^     [javac]     (POIFSFileSystem cannot be converted to AutoCloseable)     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 4 errors BUILD FAILED C:\Users\spl\Documents\Mendix\Schedule Tracker-main\deployment\build_core.xml:25: Compile failed; see the compiler error output for details. Total time: 4 seconds
asked
5 answers
2

You were probably experiencing the incompatibility between Excel importer version 5.8.0 and Excel exporter version 4.3.0.

There is now a newer version of Excel exporter, version 5.0.0, that solves this problem.

answered
1

We experience similar issues with Mendix 7.5.1

answered
1

The problem in our case appears to be multiple versions of the POI and POI--ooxml libraries in the classspath.

Removing the older versions seems to allow the module to compile correctly, but may lead to compatibility issues with other modules that require the older versions. 

Version 5.01 of the Excel Exporter (XLSReport) uses the same POI version (3.16), so should be okay. Other modules may vary, and other than looking for the .required files in the userlib folder (which perhaps don't exist for older modules?), it may not be easy to identify them.

answered
0

I ran into this issue in 7.6 aswell. I fixed it by removing the try catch statements in the java action ExcelReader.java ->  : try (POIFSFileSystem poifs = new POIFSFileSystem(content);

answered
0

This shouldn't be necessary, but try doing a deploy for eclipse, then clean and build the project from there, it seems to sort out the dependencies.

[[[ Edit - this doesn't appear to actually resolve the problem, though it sometimes allows the modeller to run the project ]]]

Modifying the module to use non resource try/catch behaviour shouldn't be necessary, and could lead to unsafe behaviour in case of exceptions unless done carefully.

answered