Compilation of java actions failed

0
Hello. Every time I need to compile aplication in mendix studio pro I have this error. Anybody now how fix?  Thanks: João Henrique   Buildfile: C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\deployment\build_core.xml compile:     [javac] Compiling 75 source files to C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\deployment\run\bin     [javac] C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\javasource\mendixsso\implementation\UserManager.java:87: error: method execute in class Core cannot be applied to given types;     [javac]         final boolean hasAccess = Core.execute(c, "MendixSSO.RetrieveUserRoles", new HashMap<String, Object>() {{     [javac]                                       ^     [javac]   required: T     [javac]   found: IContext,String,<anonymous HashMap<String,Object>>     [javac]   reason: cannot infer type-variable(s) T,R     [javac]     (actual and formal argument lists differ in length)     [javac]   where T,R are type-variables:     [javac]     T extends CoreAction<R> declared in method <T,R>execute(T)     [javac]     R extends Object declared in method <T,R>execute(T)     [javac] C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\javasource\mendixsso\implementation\UserMapper.java:51: error: method execute in class Core cannot be applied to given types;     [javac]         return Core.execute(context, this.createUserMicroflowName, new HashMap<String, Object>() {{     [javac]                    ^     [javac]   required: T     [javac]   found: IContext,String,<anonymous HashMap<String,Object>>     [javac]   reason: cannot infer type-variable(s) T,R     [javac]     (actual and formal argument lists differ in length)     [javac]   where T,R are type-variables:     [javac]     T extends CoreAction<R> declared in method <T,R>execute(T)     [javac]     R extends Object declared in method <T,R>execute(T)     [javac] C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\javasource\mendixsso\implementation\UserMapper.java:58: error: method execute in class Core cannot be applied to given types;     [javac]         Core.execute(context, this.updateUserMicroflowName, new HashMap<String, Object>() {{     [javac]             ^     [javac]   required: T     [javac]   found: IContext,String,<anonymous HashMap<String,Object>>     [javac]   reason: cannot infer type-variable(s) T,R     [javac]     (actual and formal argument lists differ in length)     [javac]   where T,R are type-variables:     [javac]     T extends CoreAction<R> declared in method <T,R>execute(T)     [javac]     R extends Object declared in method <T,R>execute(T)     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] Note: C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\javasource\mendixsso\implementation\utils\MendixUtils.java uses unchecked or unsafe operations.     [javac] Note: Recompile with -Xlint:unchecked for details.     [javac] 3 errors BUILD FAILED C:\Users\joaom\Documents\Mendix\LearnNow Training Management-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 3 seconds  
asked
2 answers
2

Have you recently upgraded your application? It looks like you have an older version of the SSO module that uses the deprecated execute method in Core. The solution is to download a newer version of the SSO module from the Marketplace, but do remember to delete the old required jar files from the userlib first as you could have some conflicts otherwise.

Hope this helps.

answered
0

I had a similar exception when upgrading my project from 8 to 9. I had a folder inside ‘resources’ that belonged to a module that was no longer part of this app. I cross-checked the modules from my app and from the marketplace against the directories in the resources folder and deleted the folders that did not correspond to any existing app module. That resolved it.

answered