Community Commons v10.2.0 causes compile error

0
I've upgraded the Community Commons module to the latest version available for Mendix 9 (using 9.24.34), but it causes a compile error:   javasource\communitycommons\StringUtils.java:231: error: cannot find symbol        return IOUtils.toString(BOMInputStream.builder().setInputStream(inputStream).get(), charset);                                              ^  symbol:   method builder()  location: class BOMInputStreamNote: Some input files use or override a deprecated API.Note: Recompile with -Xlint:deprecation for details.1 error   Any suggestion how to solve this (or just go back to previous version?).
asked
4 answers
15

Delete commons-io-2.11.0.jar (and all other obsolete jars for community commons) from the userlib

 

 

commons-lang3-3.11

failureaccess-1.0.1

guava-32.0.1-jre

j2objc-annotations-2.8

answered
1

In addition to the perfect answer of Chris:

 

If you checked your userlib folder, didn't find the libraries and still receive the error; you potentially need to update your SCIM module too. The latest version for Mendix 9 was using commons-io 2.11, which conflicts too.

 

I ran into this myself today, so hopefully it will help someone in the future.

answered
1

I am also getting the same error and after deleting the above jars file still same error,  please help 

 

 

D:\ISO\javasource\communitycommons\StringUtils.java:57: error: cannot access Function        Map.ofEntries(           ^  class file for com.google.common.base.Function not foundC:\Users\12653\Mendix\ISO\javasource\communitycommons\StringUtils.java:231: error: cannot find symbol        return IOUtils.toString(BOMInputStream.builder().setInputStream(inputStream).get(), charset);                                              ^  symbol:   method builder()  location: class BOMInputStreamNote: Some input files use or override a deprecated API.Note: Recompile with -Xlint:deprecation for details.Note: Some input files use unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.2 errors

FAILURE: Build failed with an exception.

* What went wrong:Execution failed for task ':compile'.> Compilation failed; see the compiler error output for details.

* Try:> Run with --stacktrace option to get the stack trace.> Run with --debug option to get more log output.> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

answered
0

Hi everyone, please note that you may still encounter the issue even though you have removed the above-mentioned (possible) dupliactes of the JAR files. After doing several different trials, what worked for me was:

  1. Create a backup copy of userlib and vendorlib for the app (just in case).
  2. Delete all files in the userlib folder.
  3. Run the app locally to get the error details on what was missing.
  4. From the error message I noted the modules I neede once agian and re-installed to get the new JAR files.
  5. Finally adjusted small errors/widgets updates.

Following the above-mentioned steps, no compilation error appeared anymore.

answered