Java Compiler Error when migrating project from 4.5.2 to 5.1.1

0
Hello, I've been trying to move a project I'm working on from 4.5.2 to 5.1.1 and I keep getting a compilation error; Buildfile: C:\MendixProj\LV Broker Portal-branchnewMendixMigration11Sept\deployment\buildcore.xml compile-legacy: [javac] Compiling 846 source files to C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\deployment\run\bin [javac] C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\javasource\contentmanagement\actions\AddTemporarySEFRequestHandler.java:35: error: constructor FriendlyURLs in class FriendlyURLs cannot be applied to given types; [javac] FriendlyURLs fu = new FriendlyURLs(); [javac] ^ [javac] required: IContext [javac] found: no arguments [javac] reason: actual and formal argument lists differ in length [javac] C:\Mendix_Proj\LV Broker Portal-branch_newMendixMigration_11Sept\javasource\ipsecurity\helpers\IPRangeCheckerLoginAction.java:32: error: constructor UserAction in class UserAction<R> cannot be applied to given types; [javac] { [javac] ^ [javac] required: IContext [javac] found: no arguments [javac] reason: actual and formal argument lists differ in length [javac] where R is a type-variable: [javac] R extends Object declared in class UserAction [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors BUILD FAILED C:\MendixProj\LV Broker Portal-branchnewMendixMigration11Sept\deployment\buildcore.xml:48: Compile failed; see the compiler error output for details. Total time: 43 seconds I don't understand why because I finally just managed to update all the widgets and functionality of the project on 5.1.1... Can anybody please help?
asked
2 answers
0

From the reference guide's page Moving from 4 to 5

The parameterless constructor for UserAction has been removed. Constructing a UserAction always requires an IContext now. Changes are only necessary for custom user actions which are NOT defined as custom Java action in the Modeler, e.g. an action which replaces the LoginAction using an action listener.

answered
0

From the log it states that you're calling a method and missing a method argument, the context. Likely a function has changed in the new Mx version and this change is not reflected in your code yet.

answered