Tips and Tricks for upgrading Mendix Studio Pro

Javith baig
Mendix Community
Published in
7 min readOct 5, 2021

--

This article addresses the some of the common Frequently Asked Question’s around this topic.

· Do I need to upgrade?

· Why would you not immediately upgrade to Mendix 9?

· How to upgrade safely?

The need to upgrade

The reasons behind why to upgrade to the latest LTS (Long Term Support — Studio Pro version (8.18.*)

This is the recommended version by Mendix for apps in production. The LTS version includes the latest fixes, and is kept updated also backwards from newer Studio Pro versions, like Mendix 9. If issues are found, they are back ported to the latest LTS version.

As Mendix 7 does differ from Mendix 8 in some area’s among others: Atlas UI, Java version, SVN version, Database version, maintaining applications in one Mendix version is easier.

Mendix works hard to release a new major Studio Pro version every year. Mendix supports 2 full major versions backwards. When Mendix releases Mendix 10, the support for Mendix 7 applications will stop.

Why you would not immediately upgrade to Mendix 9?

Mendix 9 brings with it the latest version of Mendix Studio Pro, but this can be risky when used to run applications in production with potential big hazards as it is still in development and new features are in beta and being tested by Mendix and the community.

Even then, migrating to Mendix 9 before the announcement of a Medium Term Support version (Version 9.6, which has become available since October 2021) still has some risks, but could be suitable for certain applications where you want make use of new features like Native Mobile capabilities or the native Workflow engine.

Upgrading to 9.2/9.3 could be an option, but you need to keep in mind the scenario of ‘forward patching’. New releases could have errors which are unidentified by you or the community and could mean a blocking processes if so. In this scenario you would need to wait before Mendix patches the issue and you are able to continue. One very important fact to know is: you cannot roll back a Mendix version, thats why it’s best to test the upgrade in a branch (but more on that later)

How to upgrade?

Below you can find the general how-to document to upgrade a project from Mendix 7 to Mendix 8 (https://docs.mendix.com/releasenotes/studio-pro/8.18).

Commit changes

In case you have any changes, make sure to commit these before starting the process.

As I mentioned above, upgrades should be done in a separate branch, which can later be used to replace the mainline. Also, it might be helpful to keep the current version of the project on your hard drive, in case you run into user lib issues.

Upgrade project to 7.23.19

Use Studio Pro 7.23.19 as the version to upgrade from and commit this in your branch to prevent you from having to do this again if an upgrade attempt to 8 fails.

7.23.24 is the latest version of Mendix 7 (at the time of writing), but 7.23.19 will suffice to be ready to upgrade to Mendix 8 as 7.23 is an LTS version: https://docs.mendix.com/releasenotes/studio-pro/7.23

Upgrade non-platform supported Marketplace modules

It might be the case that there is a Mendix 8 module available for that Marketplace module you want to update. In this case, upgrading the module after the project upgrading is OK.

When trying to upgrade CommunityCommons, a few Java actions were removed in the newer version. Note: If that’s the case, don’t upgrade this module unless really necessary.

Commit often (as you should always do) in case something as the above happens. It will prevent rework.

Compilation of Java actions failed

Java errors are to be expected, but are usually solved by updating to the Mendix 8 version of modules from the Marketplace. If custom java was implemented, the code needs to be revised and fixed manually. The convention is to keep as close to basic Mendix as possible, especially for this reason; Maintainability.

Mendix 8 runs on Java 11, whereas Mendix 7 runs on Java 8. Make sure that your Java actions are compatible with Java 11. The official Java 8 to 11 migration guide can be found in the Migrating from JDK 8 to Later JDK Releases section of the Oracle JDK Migration Guide.

https://docs.mendix.com/refguide8/moving-from-7-to-8#deprecated-apis

Upgrade your project to the latest LTS version(8.18.*)

Studio Pro 8.18 has Long Term Support (LTS) by Mendix. It is a stable and secure version and can be considered one of the best versions to migrate to.

There are newer versions of 8.18 coming out every few weeks. As 8.18 is the current LTS, you should be safe to upgrade to the latest version within the 8.18 sequence. Be sure to always read the release notes to see if there are big changes or deprecations that might break something within your project.

Upgrade platform-supported Marketplace modules and Widgets

All modules and widgets with platform support can be downloaded from the regular Marketplace.

Common Marketplace module downloads:

· Email module with template

· SAML

· Deep link

· Community Commons

Check for errors, warnings & deprecations

Fix all errors, and all easy to fix warnings and deprecations. For example Currency and Float attribute types are no longer supported, but easily fixed in Studio Pro 8.

Deprecations

In the console bar (next to errors and warnings) you can find the deprecation tab. You can right click and see if you can solve/convert the values to the new values. Test these changed values afterwards.

Test your upgraded app

It’s would be wise to, especially if you’ve upgraded modules with cross-module associations etc., to check your local deployment against a production database and verify all data is intact.

After a successful migration to 8, be sure to commit your work!

Replace main line with upgraded branch

If you have a working copy in your branch line, you cannot just merge it back to the main line which is still in Mendix 7.23.*. To bring your Mendix 8 branch to the main line, there is a specific way to do this.

Copy all items from the branch folder to the main line folder, except for the .svn directory. Make sure you have the windows explorer option enabled to ‘show hidden files’. After having done this you can open Studio Pro again from the main line and commit as usual.

This is a common way of copying a specific version to a certain line.

The upside: you can manually move a branch line to another line without having to merge; it is basically a hard copy from line to line. If you performed the action, SVN will see this copy as ‘changes’ in Studio Pro. Commit these changes and you have successfully overwritten the mainline with your upgraded branch line.

The downside: You will lose your commit history, because copying the branch line will be seen as 1 big action. So you will see all changes within 1 commit, instead of list of separate commits. If something goes wrong while over writing the project files, you can click ‘revert all changes’ in Studio Pro before attempting again.

When you upgraded the project to 8.18, you will also need the relevant version of Tortoise SVN:

  • to get insight in your team server commits
  • to access the revision graph
  • or to solve conflicts.

At time of writing, the latest version is 1.14.1 (Tortoise LTS). Link: https://tortoisesvn.net/downloads.html.

I hope this article addresses all the FAQ’s around this topic.

Read more

From the Publisher -

If you enjoyed this article you can find more like it at our Medium page.

For the makers looking to get started with the Mendix platform, you can sign up for a free account, and get instant access to learning with our Academy.

Interested in getting more involved with our community? You can join us in our Slack community channel or for those who want to be more involved, look into joining one of our Meet ups.

--

--

Javith baig
Mendix Community

Advanced Certified Mendix Developer, Quick learner and Good listener