David Townend

0
Hi Just trying to compile an old app after upgrading to V8.13.0 but am getting java compile errors. I have upgraded the add on modules to the latest version which has removed most errors but seem to still have an issue with community commons V8.2.0.  The compile error log is: Buildfile: C:\Users\dtown\OneDrive\Documents\Mendix Projects\CCM\deployment\build_core.xml compile:     [javac] Compiling 360 source files to C:\Users\dtown\OneDrive\Documents\Mendix Projects\CCM\deployment\run\bin     [javac] C:\Users\dtown\OneDrive\Documents\Mendix Projects\CCM\javasource\communitycommons\Misc.java:590: warning: [dep-ann] deprecated item is not annotated with @Deprecated     [javac]     public static boolean objectsAreEqual(Object left, Object right) {     [javac]                           ^     [javac] C:\Users\dtown\OneDrive\Documents\Mendix Projects\CCM\javasource\communitycommons\StringUtils.java:313: error: method randomAlphanumeric in class RandomStringUtils cannot be applied to given types;     [javac]         String totalChars = RandomStringUtils.randomAlphanumeric(minLen - fixedNumber, maxLen - fixedNumber);     [javac]                                              ^     [javac]   required: int     [javac]   found: int,int     [javac]   reason: actual and formal argument lists differ in length     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 1 error     [javac] 1 warning BUILD FAILED C:\Users\dtown\OneDrive\Documents\Mendix Projects\CCM\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 8 seconds I have checked that both the Misc.java and the StringUtils.java are the latest versions in my javasource directory and can not spot the issue. Any ideas? David  
asked
1 answers
1

Have a look in your userlib directory, do you have multiple versions of the commons-lang3 jar file?

Newer versions of org.apache.commons.lang3 require 2 parameters for the randomAlphanumeric method, but older versions require one. 

It looks like you need to try removing the older one, keeping the newest.
 

answered