Mx upgrade java compiling errors

1
Trying to upgrade from Mx8 to 9.6.11. Fixed everything, now stuck at compiling errors. The error message: Buildfile: **********\deployment\build_core.xml compile:     [javac] Compiling 454 source files to **********\deployment\run\bin     [javac] **********\javasource\migrationtoolkit\impl\AttributeAnalyser.java:54: error: cannot find symbol     [javac]         final boolean isUnique = "Unique".equals(dataValidation.getType());     [javac]                                                                ^     [javac]   symbol:   method getType()     [javac]   location: variable dataValidation of type IDataValidation     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 1 error BUILD FAILED *******\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 24 seconds   Hope someone can help me out, thank you for reading!  
asked
1 answers
6

The best part about these errors is that you actually get exactly what’s wrong with it :-)

The java code uses a deprecated method (getType()) – see documentation: https://apidocs.rnd.mendix.com/8/runtime/com/mendix/systemwideinterfaces/core/meta/IDataValidation.html

As you can see in the version 9 documentation, getType doesn’t exist anymore: https://apidocs.rnd.mendix.com/9/runtime/com/mendix/systemwideinterfaces/core/meta/IDataValidation.html

So simply change getType into getValidationType in \javasource\migrationtoolkit\impl\AttributeAnalyser.java  on line 54 and you’re done.

 

answered