DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Externalize Microservice Configuration With Spring Cloud Config
  • Android Cloud Apps with Azure
  • Creating Application using Spring Roo and Deploying on Google App Engine
  • How to Integrate a Distributed Database With Event Streaming

Trending

  • The Man Who Invented Selenium Also Built Its Replacement
  • Every Generation Fears the Machine. Here Is How the AI Job Panic Usually Ends
  • Avoiding AI Debt as a Team
  • Top Gen AI Frameworks for Go in 2026: A Hands-On Comparison

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. Migrate Mule 3 to Mule 4 Using MMA (Mule Migration Assistant)

Migrate Mule 3 to Mule 4 Using MMA (Mule Migration Assistant)

This article helps you to Migrate (not entirely though) your Mule 3 Application to Mule 4. Though it doesn't work for the whole application, it is quick!

By 
Sravan Lingam
·
Jul. 30, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
24.0K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Hello  Guys!

You might have heard about an "Open Source " tool called Mule Migration Assistant (MMA) that is released by MuleSoft recently.

This article helps you to Migrate (not entirely though) your Mule 3 Application to Mule 4. Even though it doesn’t entirely migrate the whole application but whatever part is migrated, it migrates very quickly! 

Note:

  • This article covers basic info on MMA
  • MMA cannot migrate the entire application as we have some things which cannot be converted like DataWeave syntaxes, inbound properties, etc. For that, we need manual effort.
  • The connectors which cannot be converted will be shown in form of "Compatibility Module" which is a connector that shows in the Mule 4 app. Compatibility module provides a set of components that either adapts Mule 3 components into the Mule 4 architecture or in some cases, enables some Mule 3 components to work in Mule 4.
  • Refer for Detailed documentation from https://github.com/mulesoft/mule-migration-assistant/blob/master/docs/user-docs/migration-tutorial.adoc

Let's get started.

Please make sure you have Anypoint Studio 6.x and 7.x versions both are required for Migration using MMA

Step 1: Download MMA

To download MMA, go to below document link and click on the circled link:

mule migration

Note: Make sure Java is installed on your system.

Unzip it once it's downloaded

Step 2: Download a Mule 3 Project or Create One:

Now to get started, we need an existing Mule 3 application ! or Create one Mule 3 application. For this article, as suggested in the official document, I have downloaded an existing Mule 3 app from the exchange ( download button is enabled only if you log in to AnyPoint platform)

Download: https://anypoint.mulesoft.com/exchange/org.mule.examples/querying-a-mysql-database/minor/1.4/

mysql database

You can also create one as you have Anypoint studio 6 version on your system.

Step 3: Import Mule 3 App to Anypoint Studio 6 Version

You have to be careful here. we cannot just use the zip file as is for migration. We need to import the downloaded project into the studio and copy the path of it. It looks like below.

Mule 3.9 with Anypoint Studio 6:


You can see there is a Database connector and an inbound parameter (query param) lastname.

Step 4: Migrate Using MMA

This is a pretty simple step. we need to define 2 paths:

projectBasePath: which is Mule 3 app path (path of the workspace)

destinationProjectBasePath: is the path where you want to place the migrated app

Make sure Java is installed.

Command used:

$ java -jar mule-migration-assistant-runner-1.0.0.jar -muleVersion 4.3.0 
-projectBasePath /Users/sravanyadav/AnypointStudio-6

/querying-a-mysql-database-1.4.0-mule-application-example 
-destinationProjectBasePath /Users/sravanyadav/Downloads

/querying-a-mysql-database-mule4 

The same command for both windows and Mac OS

Make sure you run the command inside downloaded and unzipped MMA path

You can see that the app is migrated to Mule 4.3 version (as I have given runtime as 4.3 in command) and migrated app can be seen in the destination path.

For this particular app, it took close to 8 sec to migrate. Isn’t it great?

Also, a report is generated which is very important that it contains what are errors, warnings, and info.


What happens when you don't import the downloaded Mule 3 project into the studio and instead you give the extracted path directly in command?

It fails and says that Is it a Mule Studio Project?


So please be careful while selecting the projectbase path .

Step 5: Manual Migration If Needed Based on the Summary Report

The last step is to manually migrate if any of the connectors or syntaxes are not migrated.

Now open Anypoint Studio 7, import the migrated app to the studio. And this is how it looks

The first two connectors in-process phase are compatibility modules which asks you to migrate few inbound/outbound properties.

SO here are few things we need to do manual migration:

  • Go to Http Listener responses tab and see what needs to be changed
  • Convert the syntax from inbound properties to attributes
  • Check the Database query and configuration.

All the above three are converted as below.

Remove compatibility modules and replace as below.

Before Manual migration:


After Manual migration:


That's' it!

Your Mule 3 app is migrated to Mule 4 and good to go.

Mule 3 App:

app Migration Assistant (Apple) Assistant (by Speaktoit) application Download Command (computing) Connector (mathematics) Database Property (programming)

Opinions expressed by DZone contributors are their own.

Related

  • Externalize Microservice Configuration With Spring Cloud Config
  • Android Cloud Apps with Azure
  • Creating Application using Spring Roo and Deploying on Google App Engine
  • How to Integrate a Distributed Database With Event Streaming

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook