Cannot run app locally - Java error FileDocument.java:237 & 256 Mendix version 10.18.4

0
Hi community, First comment: I was unable to select the right Mendix version for this post. it states 10.18.3 but this problem takes place in 10.18.4 (see title post)   My colleagues created a new Mendix application and imported some microflows, nanoflows, pages, market place modules, etc from another lower versioned app (Version 9.24.6) to this newly created app. The problem is the following: My 3 colleagues cannot run the app locally. When Mendix is at the "Build application" step after clicking run locally and the java actions are being created an error occurs inside the FileDocument.java (see error logging at the end of the text). The most interesting part is that I am able to run the project locally without any problem. We all use the Build-in database at the moment. We tried the following: - Compare the FileDocument.java inside the folder: "\{insertProjectname}\javasource\system\proxies\"   Which has no difference. (Since it is system generated it should have no difference) - Compared the Java JDK 21 version - Compared the preference settings in Studio Pro - Compared all the App Settings - Reinstalled the Java JDK 21 - Updated Windows 11 - Deleted the project locally on the machine of my colleague, logged in at Mendix.com and clicked "Edit in Studio Pro" to create a local new project.   None of the above worked.   The error we got is the following: C:\Mendix 10.18.4 Projects\HST - NativeApp-main\javasource\system\proxies\FileDocument.java:237: error: method getMember in interface IMendixObject cannot be applied to given types;        com.mendix.core.objectmanagement.member.MendixBinary binary = (com.mendix.core.objectmanagement.member.MendixBinary) getMendixObject().getMember(MemberNames.Contents.toString());                                                                                                                                              ^  required: IContext,String  found:    String  reason: actual and formal argument lists differ in lengthC:\Mendix 10.18.4 Projects\HST - NativeApp-main\javasource\system\proxies\FileDocument.java:237: error: incompatible types: String cannot be converted to IContext        com.mendix.core.objectmanagement.member.MendixBinary binary = (com.mendix.core.objectmanagement.member.MendixBinary) getMendixObject().getMember(MemberNames.Contents.toString());                                                                                                                                                                                      ^C:\Mendix 10.18.4 Projects\HST - NativeApp-main\javasource\system\proxies\FileDocument.java:256: error: method getMember in interface IMendixObject cannot be applied to given types;        com.mendix.core.objectmanagement.member.MendixBinary binary = (com.mendix.core.objectmanagement.member.MendixBinary) getMendixObject().getMember(MemberNames.Contents.toString());                                                                                                                                              ^  required: IContext,String  found:    String  reason: actual and formal argument lists differ in lengthC:\Mendix 10.18.4 Projects\HST - NativeApp-main\javasource\system\proxies\FileDocument.java:256: error: incompatible types: String cannot be converted to IContext        com.mendix.core.objectmanagement.member.MendixBinary binary = (com.mendix.core.objectmanagement.member.MendixBinary) getMendixObject().getMember(MemberNames.Contents.toString());                                                                                                                                                                                      ^Note: Some input files use or override a deprecated API.Note: Recompile with -Xlint:deprecation for details.Note: Some input files use unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output4 errors 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 --scan to get full insights. BUILD FAILED in 8s
asked
2 answers
0

See if your colleagues have also selected Java 21 in the project runtime settings. You may already have selected this manually. If you commit this, this setting seems not included, which is confusing.

answered
0

Hi, do your colleagues have the mendix project on an other hard drive than mendix is installed. That somehow crashes sometimes the build of native apps.

answered