More details on An error has occurred while handling the request.

Hi folks, I get an error popup " An error has occurred while handling the request. " I try to narrow down the error root cause. To that end, I reviewed the error in the modeler Log Type: Error Log node: Connector Message: An error has occurred while handling the request. [User 'MxAdmin' with session id 'sdf' and roles 'Administrator'] Stack trace: -------- java.lang.IllegalArgumentException: requirement failed: mxObject should not be null.     at scala.Predef$.require(Predef.scala:219)     at com.mendix.core.action.user.RetrieveByPathAction.<init>(RetrieveByPathAction.scala:20)     at com.mendix.core.action.ActionFactory.createRetrieveByPathAction(ActionFactory.scala:212)     at com.mendix.core.component.InternalCore.retrieveByPath(     at com.mendix.webui.actions.client.RetrieveByPathAction.execute(RetrieveByPathAction.scala:23)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:317)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:312)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:312)     at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:144)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(     at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:146)     at scala.util.Try$.apply(Try.scala:192)     at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:140)     at$class.aroundReceive(Actor.scala:465)     at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:136)     at     at     at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)     at     at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)     at scala.concurrent.forkjoin.ForkJoinTask.doExec(     at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(     at scala.concurrent.forkjoin.ForkJoinPool.runWorker(     at   I need some help analysing this. I would say that "java.lang.IllegalArgumentException: requirement failed: mxObject should not be null." means, that a microflow expects an Object, while in some situation, the object is empty (which should not happen). Any other suggestions what could have gone wrong? Is there a way to get the information of the buggy microflow?
2 answers


The cause is indeed that the microflow expects an object and receives a null value for the object.

To find out more you can use the debugger on the microflow to see in detail what is happening and why the object is not available.

Hi Marco,

When there is an error for an empty object inside a microflow you generally always can see the microflow name in the error log.

Because I can not see any microflows in the log I am suspecting that this might not be a microflow but a retrieve from a widget. Especially because I see the following information in the log> ClientRequestHandler - this is probably the module that handles xas requests from widgets.

RetrieveByPath - means that you are trying to get object via an association. If the starting object of the association is empty this might throw an error.

I would check all widgets, starting with mendix ones (data, list, template and grid views) to see which of them do a retrieve by association and then check if the context object for that retrieve could be empty. How can a context object be empty: perhaps it is fed from a microflow, or it listens to grid and nothing is selected in the grid.

Hope this helps,

PS: I am not 100% sure if this is what is going on but it is possible.