Nullpointer Exception on saving an Entity inherited from FileDocument, when associated parent object is new

Nullpointer Exception on saving an Entity inherited from FileDocument, when associated parent object is new. The example is: 2 entities - Loan and Payslip. A loan associated to many payslips. The Payslip entity inherits from FileDocument. So in the dataview of Loan I have a grid of associated Payslip. A new button invokes a microflow that creates an empty Payslip and set te reference to Loan and then shows a form with FileManager Upload. There is a out of box Save button on this form. When I click that Save I get Nullpointer exception. Modeler version 4.4. This error only occurs when my Loan is new. If I save Loan once then saving/uploading any Payslips goes fine. Stacktrace: java.lang.NullPointerException at fF.a(SourceFile:173) at com.mendix.core.Core.commit(SourceFile:540) at com.mendix.core.Core.commit(SourceFile:519) at gk.execute(SourceFile:40) at jd.a(SourceFile:319) at com.mendix.externalinterface.connector.RequestDispatching$Worker.a(SourceFile:170) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.a(SourceFile:161) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.apply(SourceFile:160) at$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:156) 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.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at at
1 answers


Tried the situation you described in Mendix version 4.4..4 and then I don't get the null pointer exception. Maybe you could upgrade your project to this version?