java.lang.IllegalArgumentException: requirement failed

I get the following error when executing a microflow. When I debug it, it doesn't tell me where it goes wrong. The error pops up at the end of the flow (Red dot). Google isn't telling me any useful things. So i hope someone else knows something useful to tell me about this error. java.lang.IllegalArgumentException: requirement failed: mxObject should not be null. at scala.Predef$.require(Predef.scala:214) at hm.<init>(SourceFile:17) at fF.a(SourceFile:249) at com.mendix.core.Core.retrieveByPath(SourceFile:985) at gD.execute(SourceFile:35) at iW.a(SourceFile:304) at com.mendix.externalinterface.connector.RequestDispatching$Worker.a(SourceFile:141) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.a(SourceFile:133) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.apply(SourceFile:131) at$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:127) at at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123) at akka.dispatch.ExecutableMailbox$ at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$ at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at at
2 answers


the answer is the first line of the stack trace: java.lang.IllegalArgumentException: requirement failed: mxObject should not be null. In your MF an action is trying to perform some change on an entity object that is not there and therefore is null. The error can occur quickly when your sub-MF is running twice and is assuming the object is created by the calling MF. Then the object that you are passing to the sub-MF from the calling MF is filled the first time and in the second run the microflow is triggered differently and now the object parameter is empty. This will result in an illegalArgumentException.


Had a similar problem. After a long time I figured out it was caused by a child refresh inside a loop. Removed the child refresh, refreshed parent object outside the loop. That fixed the problem.