java.lang.IllegalArgumentException: requirement failed

1
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 akka.actor.Actor$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:127) at akka.actor.LocalActorRef.invoke(ActorRef.scala:910) 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$class.run(ExecutorBasedEventDrivenDispatcher.scala:195) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:192)
asked
2 answers
3

Roeland,

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.

answered
2

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. 

answered