This Error is Coming While compiling mendix studio

0
This Error is Coming While compiling mendix studio   > Task :clean-custom-classes > Task :compile C:\Users\u111744\Documents\Mendix\TSOM-TSOM_new_9.24.2\javasource\deeplink\actions\ExecuteDeeplink.java:74: error: method execute in class Core cannot be applied to given types;                     Core.execute(getContext(), link.getMicroflow(), arg);                         ^   required: T   found: IContext,String,IMendixObject   reason: cannot infer type-variable(s) T,R     (actual and formal argument lists differ in length)   where T,R are type-variables:     T extends CoreAction<R> declared in method <T,R>execute(T)     R extends Object declared in method <T,R>execute(T) C:\Users\u111744\Documents\Mendix\TSOM-TSOM_new_9.24.2\javasource\deeplink\actions\ExecuteDeeplink.java:99: error: method execute in class Core cannot be applied to given types;                     Core.execute(getContext(), link.getMicroflow(), args);                         ^   required: T   found: IContext,String,Map<String,Object>   reason: cannot infer type-variable(s) T,R     (actual and formal argument lists differ in length)   where T,R are type-variables:     T extends CoreAction<R> declared in method <T,R>execute(T)     R extends Object declared in method <T,R>execute(T) C:\Users\u111744\Documents\Mendix\TSOM-TSOM_new_9.24.2\javasource\deeplink\actions\ExecuteDeeplink.java:101: error: method execute in class Core cannot be applied to given types;                     Core.execute(getContext(), link.getMicroflow());                         ^   required: T   found: IContext,String   reason: cannot infer type-variable(s) T,R     (actual and formal argument lists differ in length)   where T,R are type-variables:     T extends CoreAction<R> declared in method <T,R>execute(T)     R extends Object declared in method <T,R>execute(T) C:\Users\u111744\Documents\Mendix\TSOM-TSOM_new_9.24.2\javasource\unittesting\TestManager.java:130: error: method execute in class Core cannot be applied to given types;                 Core.execute(Core.createSystemContext(), testSuite.getModule() + ".Setup", emptyArguments);                     ^   required: T   found: IContext,String,Map<String,Object>   reason: cannot infer type-variable(s) T,R     (actual and formal argument lists differ in length)   where T,R are type-variables:     T extends CoreAction<R> declared in method <T,R>execute(T)     R extends Object declared in method <T,R>execute(T) C:\Users\u111744\Documents\Mendix\TSOM-TSOM_new_9.24.2\javasource\unittesting\TestManager.java:145: error: method execute in class Core cannot be applied to given types;                 Core.execute(Core.createSystemContext(), testSuite.getModule() + ".TearDown", emptyArguments);                     ^   required: T   found: IContext,String,Map<String,Object>   reason: cannot infer type-variable(s) T,R     (actual and formal argument lists differ in length)   where T,R are type-variables:     T extends CoreAction<R> declared in method <T,R>execute(T)     R extends Object declared in method <T,R>execute(T) C:\Users\u111744\Documents\Mendix\TSOM-TSOM_new_9.24.2\javasource\unittesting\TestManager.java:323: error: method execute in class Core cannot be applied to given types;             Object resultObject = Core.execute(mfContext, mf, emptyArguments);                                       ^   required: T   found: IContext,String,Map<String,Object>   reason: cannot infer type-variable(s) T,R     (actual and formal argument lists differ in length)   where T,R are type-variables:     T extends CoreAction<R> declared in method <T,R>execute(T)     R extends Object declared in method <T,R>execute(T) Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 6 errors > Task :compile FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compile'. > Compilation failed; see the compiler error output for details. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 31s 2 actionable tasks: 2 executed    
asked
2 answers
0

Please share the details with us. 

 

If you updated a module, please make sure to remove duplicate (older versions) of jars inside the userlib directory of your project. You can also do this automatically with the following tool: https://github.com/cinaq/mendix-userlib-cleaner . But do use it with care. 

answered
0

When you upgrade your Mendix application from 8 to 9 (or 10) you will get errors on any JavaAction using “Core.execute” function, as this function is removed.

So you will need to upgrade any marketplace module [I see the modules Deeplink and UnitTesting] and when not in the marketplace: rewrite the custom Java actions yourself and use something like:

Core.microflowCall(microflow).inTransaction(true).withParams(parameters).execute(context);

Good luck!

answered