Excel Import and Export Error When Running

0
Hi, I am using Studio Pro 10.18.1. After Excel importer or exporter is installed, I keep getting an error message Compilation of Java actions failed when attempting to run the app. Can someone please help me? It seems to be looking for a package.    Here is the beginning of the error message:   C:\Users\fzlmwy\Mendix\TestApp\javasource\excelimporter\reader\readers\ExcelDataReader.java:6: error: package org.apache.poi.xssf.usermodel does not existimport org.apache.poi.xssf.usermodel.XSSFRichTextString;                                    ^C:\Users\fzlmwy\Mendix\TestApp\javasource\excelimporter\reader\readers\ExcelDataReader.java:18: error: cannot find symbol    private static final DataFormatter formatter = new DataFormatter();                         ^  symbol:   class DataFormatter  location: class ExcelDataReaderC:\Users\fzlmwy\Mendix\TestApp\javasource\excelimporter\reader\readers\ExcelDataReader.java:59: error: cannot find symbol    private static ExcelCellData[] readRow(Spliterator<Cell> cellIterator, Predicate<String> isColumnUsed) {                                                       ^  symbol:   class Cell  location: class ExcelDataReaderC:\Users\fzlmwy\Mendix\TestApp\javasource\excelimporter\reader\readers\ExcelDataReader.java:78: error: cannot find symbol    private static Object getValue(Cell cell, CellType cellType) { 
asked
3 answers
1

Mark,

It seems your userlib folder might need to be cleaned up.  Ronald Catersels answer in this thread is the best way to get started on this:  https://community.mendix.com/link/space/java-actions/questions/115161

 

Briefly, here is how I would go about this:

  • In Studio Pro, in the App menu select Show App Directory in Explorer
  • Open the userlib directory
  • Look for jar files where you have duplicates.  Delete all but the most recent version
  • For instance, if I have the following files in my userlib directory, I would delete the ones inside the red box and keep the ones inside the green boximage.png
  • if you want to go slowly, you can delete 1 file at a time and then restart your app to see if the problem is resolved
  • otherwise, you can delete all the ones you see that are duplicates and restart to see if the error is gone.

Hope that helps,

Mike

answered
0

Hi Mike, thank you for responding. The userlib directory only has these three files. Not sure why two of the files have 0KB every time the Excel importer or exporter is installed. 

 

image.png

answered
0

The “RequiredLib” files serve as indicators from the Marketplace module, informing you that a specific library is in use; they are not the actual libraries themselves, so ignore them for now.

 

As Mike suggested, it’s essential to verify your libraries, as some may be missing or duplicated. Here’s how you can proceed:

1. Check Module Dependencies:

  • In Mendix Studio Pro, expand the ExcelImporter module.
  • Double-click on Settings to open the module settings.
  • Navigate to the Java Dependencies tab to view the declared dependencies.

2. Inspect the /userlib Folder:

  • Ensure that all required libraries are present in the /userlib directory.
  • Look out for multiple versions of the same library, as duplicates can lead to random errors due to class conflicts.

 

For efficient management of duplicate JAR files, consider using the Mendix Userlib Cleaner. This tool helps identify and remove redundant libraries, ensuring a cleaner project environment.

answered