ExecuteOnClickAction.java:79: error after Global Search module import to Mendix Studio Pro 9.0.5
I am unable to use "Global Search" module in Mendix Studio Pro version 9.0.5. Im getting below errors when running locally: Buildfile: C:\Active\Q-SMART-Development Ajit\deployment\build_core.xml compile: [javac] Compiling 551 source files to C:\Active\Q-SMART-Development Ajit\deployment\run\bin [javac] C:\Active\Q-SMART-Development Ajit\javasource\globalsearch\actions\ExecuteOnClickAction.java:79: error: method execute in class Core cannot be applied to given types; [javac] Core.execute(this.getContext(), Action.getMicroflowName(), false, parameters); [javac] ^ [javac] required: T [javac] found: IContext,String,boolean,Map<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:\Active\Q-SMART-Development Ajit\javasource\mendixsso\implementation\utils\MendixUtils.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 1 error BUILD FAILED C:\Active\Q-SMART-Development Ajit\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 12 seconds Is there a way to fix this?
The execute method in the Java Core library was deprecated in Mendix 8.6, and a new way of calling Microflows introduced.
I wrote an article on this at the time with more details of how to get this working.