<-- Back

App fails to start with Cannot invoke "Object.getClass()" when microflow contains disabled activity without Action type

Issue

An application that was developed in Studio Pro v10.21.0 and 10.21.1, then deployed to Mendix Cloud,  failed to start. The following error can be found in the application logs:

java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "modelAction" is null

Environment

Applications hosted in Mendix Cloud 

Studio Pro v10.21.0 and v10.21.1

Cause

This issue occurs when a microflow contains a disabled activity that was never assigned an action type in the Microflow:

During application startup, the microflow engine processes all activities, including disabled ones. If a disabled activity has not been assigned an action type, its associated modelAction remains null. When the engine subsequently attempts to invoke a method on this null reference (e.g., getClass()), it results in a NullPointerException.

Solution/Workaround

A workaround for this issue involves the following steps: 

  1. Open the affected microflow in Mendix Studio Pro.

  2. Identify any disabled action activities that have not been assigned an action type. 

  3. Either assign an appropriate action type to these activities or remove them from the microflow.

  4. Rebuild and redeploy the application. Then, verify a successful startup.

This has been fixed in Studio Pro v10.22.0 and v11.0.0.

Internal information related

  • 243931, 245327
  • C3T260XGA/p1743426699654909
  • RUN-4608

Additional information 

Documentation: Microflows Events Common Properties

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.