NullPointerException on Retrieve over association

0
The domain model looks as follows: Where Offreren.Offerte is a specialization of Register. [UPDATE] Setting the ConnectionBus_MappIng to Trace shows: Mapped query: SELECT offreren$offerte.id, dj1dcm$register.registerid, dj1dcm$register.omschrijving FROM offreren$offerte INNER JOIN dcm$register AS dj1dcm$register ON dj1dcm$register.id = offreren$offerte.id WHERE offreren$offerte.id = 23643898043695307 Dependent queries: { SELECT DISTINCT dcm$registercase.dcm$registerid, dcm$registercase.dcm$caseid FROM dcm$registercase WHERE dcm$register_case.dcm$registerid = } How does this work? Where does the Dependent query come from? [ORIGINAL MESSAGE] I have a microflow which I call through a Java Action (CommunityCommons.ExecuteMicroflowAsUser_2). In this MF a Register entity is retrieved over association from a TaakInstantie. This retrieve results in a java.lang.NullPointerException. When debugging this microflow I see that I have a TaakInstantie. I set the ConnectionBus_Retrieve to Trace and got the following results: RequestAnalyzer: incoming request IdentifierGetRequest: Object types: [Offreren.Offerte] RequestAnalyzer: incoming request info:IdentifierGetRequest { [MendixIdentifier:: id=23643898043695205 objectType=Offreren.Offerte entityID=84] } SQL: SELECT "offreren$offerte"."id", "dj1dcm$register"."registerid", "dj1dcm$register"."omschrijving" FROM "offreren$offerte" INNER JOIN "dcm$register" "dj1dcm$register" ON "dj1dcm$register"."id" = "offreren$offerte"."id" WHERE "offreren$offerte"."id" = 23643898043695205 Data table Offreren.Offerte (0 row(s)) Column names: 1 offreren$offerte.ID PRIMARY 2 RegisterID 3 Omschrijving Even if there are no Offertes (a specialization of Register) I wouldn't expect a Java-exception. What could cause this behaviour? The error + StackTrace are: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at Offreren.WerkorderHaalOpOfCreeer (RetrieveFromCache : 'Retrieve Register by $TaakInstantie/TaakInstantieRegister') at DCMDesign.V001WerkorderOmschrijvingGevuld (SubMicroflow : 'Werkorder_HaalOpOfCreeer') Advanced stacktrace: at DCM.TaakinstantieControlesUitvoeren.nested.c1d9b534-127f-423a-a9e8-b6ceec77a461 [0 of 1] (JavaAction : 'executeMicroflowAsUser2') at DCM.TaakinstantieControlesUitvoeren (NestedLoopedMicroflow : '') at DCM.SubControleerTaakinstantie (SubMicroflow : 'TaakinstantieControlesUitvoeren') at DCM.SubMaakTaakInstantieBijRegister.nested.deee68c3-0cc8-443f-9e71-c91a1d74d61c [1 of 3] (SubMicroflow : 'SubControleerTaakinstantie') at DCM.SubMaakTaakInstantieBijRegister (NestedLoopedMicroflow : '') at DCM.SubInitialiseerTakenVoorProces.nested.a62234e6-c99d-4958-9882-e9dd735b16dd [0 of 1] (SubMicroflow : 'SubMaakTaakInstantieBijRegister') at DCM.SubInitialiseerTakenVoorProces (NestedLoopedMicroflow : '') at DCM.IvkCasenew (SubMicroflow : 'SubInitialiseerTakenVoorProces') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:143) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at Offreren.WerkorderHaalOpOfCreeer (RetrieveFromCache : 'Retrieve Register by $TaakInstantie/TaakInstantieRegister') at DCMDesign.V001WerkorderOmschrijvingGevuld (SubMicroflow : 'Werkorder_HaalOpOfCreeer') Advanced stacktrace: at com.mendix.core.component.InternalCore.execute(InternalCore.java:385) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at Offreren.WerkorderHaalOpOfCreeer (RetrieveFromCache : 'Retrieve Register by $TaakInstantie/TaakInstantieRegister') at DCMDesign.V001WerkorderOmschrijvingGevuld (SubMicroflow : 'Werkorder_HaalOpOfCreeer') Advanced stacktrace: at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:178) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at Offreren.WerkorderHaalOpOfCreeer (RetrieveFromCache : 'Retrieve Register by $TaakInstantie/TaakInstantieRegister') at DCMDesign.V001WerkorderOmschrijvingGevuld (SubMicroflow : 'Werkorder_HaalOpOfCreeer') Advanced stacktrace: at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at Offreren.WerkorderHaalOpOfCreeer (RetrieveFromCache : 'Retrieve Register by $TaakInstantie/TaakInstantieRegister') at DCMDesign.V001WerkorderOmschrijvingGevuld (SubMicroflow : 'Werkorder_HaalOpOfCreeer') Advanced stacktrace: at com.mendix.core.component.InternalCore.execute(InternalCore.java:352) Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at Offreren.WerkorderHaalOpOfCreeer (RetrieveFromCache : 'Retrieve Register by $TaakInstantie/TaakInstantieRegister') at DCMDesign.V001WerkorderOmschrijvingGevuld (SubMicroflow : 'Werkorder_HaalOpOfCreeer') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:143) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:178) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: java.lang.NullPointerException: null at com.mendix.core.action.user.RetrieveByPathAction$$anonfun$retrieveFromSameSide$1.apply(RetrieveByPathAction.scala:56) at com.mendix.core.action.user.RetrieveByPathAction$$anonfun$retrieveFromSameSide$1.apply(RetrieveByPathAction.scala:56) at scala.collection.TraversableLike$$anonfun$filterImpl$1.apply(TraversableLike.scala:259) at scala.collection.immutable.List.foreach(List.scala:381) at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:258) at scala.collection.TraversableLike$class.filter(TraversableLike.scala:270) at scala.collection.AbstractTraversable.filter(Traversable.scala:104) at com.mendix.core.action.user.RetrieveByPathAction.retrieveFromSameSide(RetrieveByPathAction.scala:56) at com.mendix.core.action.user.RetrieveByPathAction.executeAction(RetrieveByPathAction.scala:42) at com.mendix.core.action.user.RetrieveByPathAction.executeAction(RetrieveByPathAction.scala:13) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:168) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:174) at com.mendix.core.component.InternalCore.retrieveByPath(InternalCore.java:899) at com.mendix.modules.microflowengine.actions.mxobject.RetrieveFromCacheAction.execute(RetrieveAction.scala:38) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:168) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:174) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:459) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(CustomMonitoredAction.scala:14) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:144) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 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 akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:136) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
1 answers
0

The 1-1 connection needs to be set up on BOTH sides, did you do that ?

answered