Compilation fails with Studio Pro 9.02 error: method execute in class Core cannot be applied to given types

0
I am preparing for upgrading our current apps from 8.17 to 9.02 Any idea what is causing the errors below (mostly from AppStore modules, like process queue , sftp, etc) and how to solve? Do we have to wait until the used appstore modules have been upgraded to work in 9.02? Buildfile: C:\Users\kmn0\Documents\Mendix\JflowCopy\deployment\build_core.xml compile:     [javac] Compiling 325 source files to C:\Users\kmn0\Documents\Mendix\JflowCopy\deployment\run\bin     [javac] C:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\microflowscheduler\actions\ExecuteMicroflow.java:32: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(getContext(),microFlowName);     [javac]                 ^     [javac]   required: T     [javac]   found: IContext,String     [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\kmn0\Documents\Mendix\JflowCopy\javasource\processqueue\queuehandler\ObjectQueueExecutor.java:138: error: method execute in class Core cannot be applied to given types;     [javac]                         Object booleanResult = Core.execute(this.context, this.microflowName, this.action);     [javac]                                                    ^     [javac]   required: T     [javac]   found: IContext,String,IMendixObject     [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\kmn0\Documents\Mendix\JflowCopy\javasource\processqueue\queuehandler\ObjectQueueExecutor.java:222: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(context, "ProcessQueue.SF_WriteExecutionLog", paramMap);     [javac]                 ^     [javac]   required: T     [javac]   found: IContext,String,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\kmn0\Documents\Mendix\JflowCopy\javasource\processqueue\queuehandler\ObjectQueueExecutor.java:240: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(this.context, "ProcessQueue.SF_WriteExecutionLog", paramMap);     [javac]                 ^     [javac]   required: T     [javac]   found: IContext,String,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\kmn0\Documents\Mendix\JflowCopy\javasource\sftp\actions\Connect.java:132: error: method execute in class Core cannot be applied to given types;     [javac]             result = Core.execute(getContext(), this.microflow, this.microflowArgument);     [javac]                          ^     [javac]   required: T     [javac]   found: IContext,String,IMendixObject     [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\kmn0\Documents\Mendix\JflowCopy\javasource\unittesting\TestManager.java:133: error: method execute in class Core cannot be applied to given types;     [javac]                     Core.execute(setupContext, testSuite.getModule() + ".Setup", emptyArguments);     [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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\unittesting\TestManager.java:152: error: method execute in class Core cannot be applied to given types;     [javac]                     Core.execute(setupContext, testSuite.getModule() + ".TearDown", emptyArguments);     [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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\unittesting\TestManager.java:154: error: method execute in class Core cannot be applied to given types;     [javac]                     Core.execute(Core.createSystemContext(), testSuite.getModule() + ".TearDown", emptyArguments);     [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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\unittesting\TestManager.java:344: error: method execute in class Core cannot be applied to given types;     [javac]             Object resultObject = Core.execute(mfContext, mf, emptyArguments);     [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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\updaterelate\proxies\microflows\Microflows.java:22: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(context, "UpdateRelate.DELRelateUpdate", 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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\updaterelate\proxies\microflows\Microflows.java:34: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(context, "UpdateRelate.RelateALLProductVersion", 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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\updaterelate\proxies\microflows\Microflows.java:46: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(context, "UpdateRelate.RelateALLPublisher_ComapnyGroup", 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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\updaterelate\proxies\microflows\Microflows.java:59: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(context, "UpdateRelate.RelateCG2PUB", 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:\Users\kmn0\Documents\Mendix\JflowCopy\javasource\updaterelate\proxies\microflows\Microflows.java:72: error: method execute in class Core cannot be applied to given types;     [javac]             Core.execute(context, "UpdateRelate.RelateProductVersion", 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: Some input files use unchecked or unsafe operations.     [javac] Note: Recompile with -Xlint:unchecked for details.     [javac] 14 errors BUILD FAILED C:\Users\kmn0\Documents\Mendix\JflowCopy\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 7 seconds      
asked
7 answers
3

Studio Pro 9.0.2 is a beat release and thus appstore modules are not yet supported

answered
1

I get this error in 9.0.5:

Buildfile: C:\Users\coddr-srva\Documents\Mendix\whg-choose-and-move-main\deployment\build_core.xml

compile:
    [javac] Compiling 405 source files to C:\Users\coddr-srva\Documents\Mendix\whg-choose-and-move-main\deployment\run\bin
    [javac] C:\Users\coddr-srva\Documents\Mendix\whg-choose-and-move-main\javasource\deeplink\actions\ExecuteDeeplink.java:74: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(getContext(), link.getMicroflow(), arg);
    [javac]                         ^
    [javac]   required: T
    [javac]   found: IContext,String,IMendixObject
    [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\coddr-srva\Documents\Mendix\whg-choose-and-move-main\javasource\deeplink\actions\ExecuteDeeplink.java:99: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(getContext(), link.getMicroflow(), args);
    [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:\Users\coddr-srva\Documents\Mendix\whg-choose-and-move-main\javasource\deeplink\actions\ExecuteDeeplink.java:101: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(getContext(), link.getMicroflow());
    [javac]                         ^
    [javac]   required: T
    [javac]   found: IContext,String
    [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] 3 errors

BUILD FAILED
C:\Users\coddr-srva\Documents\Mendix\whg-choose-and-move-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details.

Total time: 5 seconds

answered
1

The root cause for such errors is the change how Mendix dynamically calls microflows. You need to upgrade your modules to MX9 compatible. You might also have to review your own Java actions where you dynamically call microflows.

answered
0

There are some issues with the beta release 9.0.2. If your app is using external modules like you have mentioned, you should better keep it in 8.17 until a stable  Mendix 9.x is released. 
I have also seen similar issues which were due to the 9.0.2 and works correct in latest stable 8.17 release

answered
0

You best wait on version 9.1.0 as this error has been occuring in MendixSSO, CommunityCommons and several other modules. I raised a ticket a couple of days ago, and Mendix is on it, but this will take some days/weeks to repair. It is a beta.

answered
0

In 9.03 I still have a lot of java compile errors in the modules:

ldap (saml?), processqueue, sftp, unittesting, updaterelate?

I checked the appstore , only communitycommons and nativemobileresources had mx9 versions. For me it makes no sense of further testing until the mentioned appstore modules have mx9 versions.

some examples of the java compile errors:

 C:\Users\kmn0\Documents\Mendix\JflowCopy-main_2\javasource\updaterelate\proxies\microflows\Microflows.java:22: error: method execute in class Core cannot be applied to given types;
    [javac]             Core.execute(context, "UpdateRelate.DELRelateUpdate", params);
    [javac]                 ^

C:\Users\kmn0\Documents\Mendix\JflowCopy-main_2\javasource\ldap\proxies\microflows\Microflows.java:24: error: method execute in class Core cannot be applied to given types;
    [javac]             Core.execute(context, "Ldap.ACr_LdapServer_SetIgnoreAdminRole", params);
    [javac]                 ^

C:\Users\kmn0\Documents\Mendix\JflowCopy-main_2\javasource\processqueue\queuehandler\ObjectQueueExecutor.java:222: error: method execute in class Core cannot be applied to given types;
    [javac]             Core.execute(context, "ProcessQueue.SF_WriteExecutionLog", paramMap);
    [javac]                 ^

 

answered
0
In my case the issue was resolved by updating the unit test module to the latest version.



\javasource\unittesting\TestManager.java:140: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(setupContext, testSuite.getModule() + ".Setup", emptyArguments);
    [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)\javasource\unittesting\TestManager.java:140: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(setupContext, testSuite.getModule() + ".Setup", emptyArguments);
    [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)\javasource\unittesting\TestManager.java:140: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(setupContext, testSuite.getModule() + ".Setup", emptyArguments);
    [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)\javasource\unittesting\TestManager.java:140: error: method execute in class Core cannot be applied to given types;
    [javac]                     Core.execute(setupContext, testSuite.getModule() + ".Setup", emptyArguments);
    [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)

answered