Demo errors, Create an App with Advanced Page Building

0
I am evaluating Mendix by learning demo. Create an App with Advanced Page Building, I completed half of it, but when I try to run the demo local, it had error,  Do you have MPK file so that I can reference and find what is wrong.   When I click button save, following error show up, I asumed that at this time it should not insert data into DB, it should save data into session or somewhere, Persistence action should be at step3(finalize the request).  I struggled with the problem whole day, Please help   com.mendix.core.CoreRuntimeException: Failed to commit     at com.mendix.basis.component.CommitHandler.commit(CommitHandler.scala:151) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.modules.microflowengine.MicroflowException: requirement failed: Change object 'Request' should not be null     at Expenses.ACO_RequestLine_CalculateTotalAmount (Change : 'Change 'Request' (TotalAmount)')     at {"before":[{}],"action":{"type":"CommitAction"},"after":[{}],"type":"EventExtendedAction"} Advanced stacktrace:     at com.mendix.basis.actionmanagement.ActionManagerBase.executeInTransactionSync(ActionManagerBase.java:123) Caused by: com.mendix.modules.microflowengine.MicroflowException: requirement failed: Change object 'Request' should not be null     at Expenses.ACO_RequestLine_CalculateTotalAmount (Change : 'Change 'Request' (TotalAmount)')     at {"before":[{}],"action":{"type":"CommitAction"},"after":[{}],"type":"EventExtendedAction"} Advanced stacktrace:     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:152) Caused by: java.lang.IllegalArgumentException: requirement failed: Change object 'Request' should not be null     at scala.Predef$.require(Predef.scala:281)     at com.mendix.modules.microflowengine.actions.mxobject.ChangeAction.execute(ChangeAction.scala:40)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:215)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:165)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152)     at com.mendix.basis.component.InternalCoreBase.executeSync(InternalCoreBase.java:382)     at com.mendix.basis.actionmanagement.SyncEventExtendedAction.executeAfterActionsSync(SyncEventExtendedAction.java:95)     at com.mendix.basis.actionmanagement.SyncEventExtendedAction.executeAction(SyncEventExtendedAction.java:47)     at com.mendix.basis.actionmanagement.EventExtendedAction.execute(EventExtendedAction.java:101)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:150)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeInTransactionSync(ActionManagerBase.java:116)     at com.mendix.basis.component.CommitHandler.$anonfun$storeObjectsAndAutoCommittedObjects$1(CommitHandler.scala:189)     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)     at scala.collection.immutable.List.foreach(List.scala:392)     at scala.collection.TraversableLike.map(TraversableLike.scala:238)     at scala.collection.TraversableLike.map$(TraversableLike.scala:231)     at scala.collection.immutable.List.map(List.scala:298)     at com.mendix.basis.component.CommitHandler.storeObjectsAndAutoCommittedObjects(CommitHandler.scala:187)     at com.mendix.basis.component.CommitHandler.commit(CommitHandler.scala:125)     at com.mendix.basis.component.CommitHandler.commit$(CommitHandler.scala:109)     at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:46)     at com.mendix.basis.component.CommitHandler.commitWithEvents(CommitHandler.scala:69)     at com.mendix.basis.component.CommitHandler.commit(CommitHandler.scala:49)     at com.mendix.basis.component.CommitHandler.commit$(CommitHandler.scala:48)     at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:46)     at com.mendix.basis.component.CommitHandler.commit(CommitHandler.scala:25)     at com.mendix.basis.component.CommitHandler.commit$(CommitHandler.scala:25)     at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:46)     at com.mendix.webui.actions.client.RegularClientActions$.commit(RegularClientActions.scala:37)     at com.mendix.webui.actions.client.RegularClientActionWiring.$anonfun$regularClientActionMap$1(RegularClientActionWiring.scala:18)     at com.mendix.webui.actions.client.RegularClientAction$Helpers$.$anonfun$liftEither$1(RegularClientAction.scala:29)     at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.$anonfun$apply$4(RegularClientAction.scala:55)     at com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:35)     at com.mendix.webui.requesthandling.helpers.StateHandling.withState$(StateHandling.scala:32)     at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.withState(RegularClientAction.scala:45)     at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.apply(RegularClientAction.scala:53)     at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.apply(RegularClientAction.scala:45)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$3(RegularClientAction.scala:109)     at scala.util.Try$.apply(Try.scala:213)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2(RegularClientAction.scala:109)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2$adapted(RegularClientAction.scala:107)     at com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$5(ContextHandling.scala:47)     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java     
asked
1 answers
0

Hi Zhaojie,

in your stacktrace the following can be found: 'Request' should not be null

you're trying to change your TotalAmount attribute on the Request object. but the request object doesn't exist at the point where your change action is.

Are you retrieving a request object from the database and trying to change it?

 

answered