Creating XML doc using domain mapping.

1
Hi Experts, I am (new to Mendix and) attempting to create an XML document via a microflow using the following logic to send to our SAP system: Step 1: Create Entity (specifying a entity type of System.FileDocument) Step 2: Retrieve value from DB using Xpath constraint Step 3: Export to XML Domain mapping (parameter from step 2) and referring to XML document in Step 1. I have debugged the steps and can see that step 1 & 2 are successful and values are retrieved. When step 3 is executed the following error is thrown: "An error occurred while handling the request". Here is a link to a short video of the problem: click here Full stack trace for reference: a: at {} at Cremas.SendToSAP (ImportXML : 'Export XML document NewIDoc') Advanced stacktrace: at mg.a(SourceFile:188) Caused by: java.lang.NullPointerException at nG.a(SourceFile:261) at nG.b(SourceFile:125) at nG.a(SourceFile:115) at nG.b(SourceFile:159) at nG.a(SourceFile:145) at nG.b(SourceFile:130) at nG.a(SourceFile:70) at lq.a(SourceFile:77) at lq.a(SourceFile:62) at mg.a(SourceFile:78) at mf.executeAction(SourceFile:101) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hC.b(SourceFile:182) at com.mendix.core.Core.execute(SourceFile:219) at gm.execute(SourceFile:186) at iW.a(SourceFile:297) 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) Any ideas on what I am doing wrong? Thanks in advance, Warren
asked
2 answers
0

Try adding a breakpoint to your microflow, this will give you a better view of which entity is empty. Or in your case if your document will actually receive input.

Another thing is that i would guess it to go wrong in the mapping but to be sure you would have to show us your mapping/mapping microflows as well.

answered
0

A NullPointerException is always bad, even if there might be something incorrect in the data, the exception should be more clear. I suggest filing a ticket with a reproduction project and we'll have a look.

answered