Misc.java:5: error: cannot find symbol import com.mendix.core.conf.RuntimeVersion;

0
When trying to run my application, I am getting the following error (showing one of many):C:\Mendix\Mx_226278_appfactory-main\Design_Starter_App\javasource\communitycommons\Misc.java:5: error: cannot find symbolimport com.mendix.core.conf.RuntimeVersion;This is the thirs line in Misc.java as shown herepackage communitycommons;import com.mendix.core.Core;import com.mendix.core.CoreException;import com.mendix.core.conf.RuntimeVersion;import com.mendix.core.objectmanagement.member.MendixBoolean;import com.mendix.integration.WebserviceException;import com.mendix.systemwideinterfaces.core.IContext;import com.mendix.systemwideinterfaces.core.IMendixObject;....
asked
4 answers
0

This usually means your Community Commons version is not compatible with your Mendix runtime version.


If Studio Pro cannot find that class, it usually means the Java code in your current Community Commons module was written for a different Mendix version than the one your project is running on.


A common fix is to remove the current Community Commons module from the app and install the version that matches your Mendix Studio Pro version from the Marketplace. After that, do a clean deployment directory and run the app again.


I would also recommend checking whether there are any old or conflicting files left in javasource, userlib, or vendorlibafter updating the module. Sometimes an older module update leaves behind Java files or jars that cause compile errors like this.


So in practice, the most likely cause is a version mismatch between Mendix and Community Commons, and the safest fix is to reinstall the correct Marketplace version instead of manually editing Misc.java.


If this resolves your issue, please mark the answer as accepted so it can help others facing the same problem.


answered
0

I removed both versions of StudioPro. Deleted everything in C:\ProgramFiles\Mendix, and rebooted my machjine. I then installed 11.8.0 again and still have the same problem. I am going to downgrade StudioPro versions until it works again.


I am running on Windows, so no userlib, and do not know where to run Project → Clean Deployment Directory and start the app again.


I think I will avoid 11.8.0 until it gets a little more field tested.


Thank you for your suggestions

answered
0

You are right to check the Studio Pro version, but just to clarify: Clean Deployment Directory is available from the App menu, not Project.


Also, on Windows, the userlib folder should normally be inside your project folder. It is not under the Studio Pro installation directory. So it is worth checking your app project directory for both userlib and any remaining javasource/communitycommons files.


Because of that, I would still first verify the project contents before concluding that Studio Pro 11.8.0 itself is the root cause.

answered
0

That looks like you have an older version of the Community Commons module in your application. The example lines from Misc.java don't match those in the latest version of Community Commons.

To fix this, go to the Marketplace Tab in Studio Pro and search for Community Commons. You want to download the latest version (V11.5.0). This should update the version of Community Commons in your application.

To confirm which version of Community Commons you have in your app, go to the App Explorer in Studio Pro. Open the App '<your app name>' -> Marketplace modules -> CommunityCommons. You should see a file called '_Version <whatever version you have>'.

I hope this helps.

answered