Java compilation error

0
Hi, We have recently upgraded a project from 6.10.17 to 7.22.0. When we try to run it locally we get the following compilation errors: compile:     [javac] Compiling 1504 source files to C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\deployment\run\bin     [javac] C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\javasource\singlesignonauthenticate\CustomLoginAction.java:148: error: cannot find symbol     [javac]                              int failedLogins = user.getFailedLogins() + 1;     [javac]                                                     ^     [javac]   symbol:   method getFailedLogins()     [javac]   location: variable user of type IUser     [javac] C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\javasource\singlesignonauthenticate\CustomLoginAction.java:149: error: cannot find symbol     [javac]                  user.setFailedLogins(failedLogins);     [javac]                      ^     [javac]   symbol:   method setFailedLogins(int)     [javac]   location: variable user of type IUser     [javac] C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\javasource\singlesignonauthenticate\CustomLoginAction.java:151: error: cannot find symbol     [javac]                    user.setBlocked(true);     [javac]                        ^     [javac]   symbol:   method setBlocked(boolean)     [javac]   location: variable user of type IUser     [javac] C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\javasource\singlesignonauthenticate\CustomLoginAction.java:152: error: cannot find symbol     [javac]                  user.commit();     [javac]                      ^     [javac]   symbol:   method commit()     [javac]   location: variable user of type IUser     [javac] C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\javasource\singlesignonauthenticate\CustomLoginAction.java:158: error: cannot find symbol     [javac]                        .append(getComponent().configuration().getClusterManagerActionInterval() / (60 * 1000)).append(" minutes.").toString();     [javac]                                ^     [javac]   symbol:   method getComponent()     [javac]   location: class CustomLoginAction     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 5 errors   BUILD FAILED C:\Users\reedp\Documents\Mendix\KMBC_RevsAndBensPortal-branch - Upgrade to 7_16_2\deployment\build_core.xml:29: Compile failed; see the compiler error output for details.   Total time: 31 seconds   We are wondering if there is some outdated Java library that are being used here and where we could find out what they need to be replaced with?
asked
1 answers
0

The first step is to check for double JAR files in your userlib with different version numbers. You can delete the oldest version. If that does not solve the issue you can use the Trick of Rolf Bolt in this post: https://forum.mendix.com/link/questions/86721

Another trick would be to set

-verbose:class

as JVM parameter (Project Explorer -> Project -> Settings -> Configuration -> Edit -> Server -> Extra JVM parameters )

This will give you logs about conflicting jar files.

And what I always do myself when doing major Mendix version upgrade is remove all in the userlib and download the modules from the appstore again. If you have no own custom Java in your model a good way to start clean. You still have to do the above because multiple modules have conflicting jar files in the module.

Hope this helps,

Ronald

answered