Compilation of Java Actions failed with 9.1.1v error: method execute in class Core cannot be applied to given types

0
I am upgrading my app from 8.15.2 to 9.1.1 Any idea on what is causing this error in appstore modules? What is the workaround? Buildfile: C:\\workdir\\Upgrade\\deployment\\build_core.xml compile: [javac] Compiling 574 source files to C:\\workdir\\Upgrade\\deployment\\run\\bin [javac] C:\\workdir\\Upgrade\\javasource\\communitycommons\\Misc.java:595: warning: [dep-ann] deprecated item is not annotated with @Deprecated [javac] public static boolean objectsAreEqual(Object left, Object right) { [javac] ^ [javac] C:\\workdir\\Upgrade\\javasource\\Application_Name\\actions\\RedirectRequestHandler.java:116: error: method execute in class Core cannot be applied to given types; [javac] Core.execute(context, "ModuleName.MicroflowName", params); [javac] ^ [javac] required: T [javac] found: IContext,String,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] C:\\workdir\\Upgrade\\javasource\\modulename\\actions\\RedirectRequestHandler.java:112: error: method execute in class Core cannot be applied to given types; [javac] Core.execute(context, "ModuleName.MicroflowName", params); [javac] ^ [javac] required: T [javac] found: IContext,String,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:\\workdir\\Upgrade\\javasource\\saml20\\implementation\\common\\MendixUtils.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors [javac] 1 warning BUILD FAILED C:\\workdir\\Upgrade\\deployment\\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 25 seconds
asked
2 answers
2

You have two RedirectRequestHandler.java errors, one in Application_Name and one in modulename. 

These are using the deprecated execute method in Core that was removed in Mendix 9. You will need to rewrite this to use the new microflowCall method.

For more details on how to use microflowCall, have a look at this article I wrote when they were first released. https://medium.com/mendix/the-new-way-to-call-mendix-microflows-from-java-actions-46152923dbbc#cc95
 

answered
0

This the problem with the Misc.java file in the community commons module. Update the module or else open the app in eclipse and resolve the generic error, you will be able to run the app again.

answered