Nullpointer in PDF creation

I am getting a null pointer exception when creating a PDF document. The problem is that I can not track why it gets a nullpointer exception. All object in the microflow before the create template are filled and the microflow which is used in the template has also an object. This is the error: lg: at Basis.MedewerkerKaartOpenen ( : 'Generate PDF (.pdf) document using template 'MedewerkerKaart'') Advanced stacktrace: at mt.a(SourceFile:187) Caused by: java.lang.NullPointerException at kO.a(SourceFile:178) at kF.a(SourceFile:73) at kD.a(SourceFile:321) at kM.a(SourceFile:70) at kD.a(SourceFile:321) at kN.a(SourceFile:75) at kD.a(SourceFile:321) at kM.a(SourceFile:70) at kD.a(SourceFile:321) at kM.a(SourceFile:70) at kD.a(SourceFile:321) at kC.a(SourceFile:33) at kD.a(SourceFile:321) at kD.a(SourceFile:129) at kx.a(SourceFile:81) at kv.a(SourceFile:89) at kv.a(SourceFile:56) at lm.a(SourceFile:109) at mt.a(SourceFile:72) at ms.a(SourceFile:151) at ms.executeAction(SourceFile:98) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at at hC.b(SourceFile:207) at com.mendix.core.Core.execute(SourceFile:226) at gn.execute(SourceFile:186) 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$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at at Anybody a guess where to look for the cause of this nullpointer? Because the above error does not give me a clue. Regards, Ronald
1 answers

A nullpointer should never happen and thus won't give you a clue as to why it's occurring, there is no error information.

Analyzing the unobfuscated stacktrace though, this seems to be happening due to some enumeration not having an image. You probably set the property 'Enumeration format' of a dynamic label to 'Image' while the enumeration used does not have an image. I will file a ticket for it since I just built a reproduction case, but you can easily fix this yourself in your project.

Edit: Since it was a small fix, I fixed it already, it will be released in 4.5.0