undefined is not a valid entity after changing Xpath constraint

1
After changing access rules Xpath constraint (over associations) on a entity Xpath constraint in access rule: Dossier.Dossier\_AssignedExpert/Dossier.AssignExpert/Dossier.AssignExpert\_Relation/CRM.Relation/CRM.Contact\_Relation/CRM.Contact/CRM.ContactAccount\_Contact='[%CurrentUser%]' or Dossier.Dossier\_AssignedExpert/Dossier.AssignExpert/Dossier.AssignExpert_Employee/CRM.Employee/CRM.Employee\_Account='[%CurrentUser%]' we get the following error: com.mendix.core.CoreRuntimeException: 'undefined' is not a valid entity Stacktrace: com.mendix.core.CoreRuntimeException: 'undefined' is not a valid entity at com.mendix.core.objectmanagement.SchemeManagerImpl.getMetaObject(SchemeManagerImpl.java:1554) at com.mendix.core.objectmanagement.SchemeManagerImpl.getMetaObject(SchemeManagerImpl.java:129) at com.mendix.core.component.InternalCore.getMetaObject(InternalCore.java:1813) at com.mendix.util.paths.AttributePath.getMetaPrimitive(AttributePath.java:87) at com.mendix.webui.actions.ActionUtil$.com$mendix$webui$actions$ActionUtil$$hasNoVirtualAttributes(ActionUtil.scala:65) at com.mendix.webui.actions.ActionUtil$$anonfun$buildSortMap$1.apply(ActionUtil.scala:41) at com.mendix.webui.actions.ActionUtil$$anonfun$buildSortMap$1.apply(ActionUtil.scala:38) at scala.collection.immutable.Range.foreach(Range.scala:160) at com.mendix.webui.actions.ActionUtil$.buildSortMap(ActionUtil.scala:38) at com.mendix.webui.actions.ActionUtil$.buildSortMap(ActionUtil.scala:31) at com.mendix.webui.actions.ActionUtil$.addSortExpressions(ActionUtil.scala:136) at com.mendix.webui.actions.client.XPathRetriever.retrieveWithSchema(XPathRetriever.scala:69) at com.mendix.webui.actions.client.RetrieveByXPathAction.execute(RetrieveByXPathAction.scala:36) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:126) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:128) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:122) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:119) 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) What can cause such an error? Thanks!
asked
1 answers
5

If this error is reproducable, the easiest way is probably to look at the trace messages from the platfrom. When you enable trace logging of the lognode Connectionbus_retrieve you will get to see all XPath, OQL, and SQL queries while the platform processes them.

This should allow you to search for 'null' or 'undefined' in the overview.

I have had errors that look similar to this when I didn't properly configured my security, for example I tried to sort on an attribute on which I had no access at all. (You can't sort on something you cannot read) The other time I got this was when my database got 'corrupted' because of invalid inheritance in the table. I remove records manually breaking the expected inheritance structure, also giving 'undefined' error messages when certain data is missing in the query.

If you can get the queries that fail and you're unsure how to resolve the problem, just post the query and we might be able to suggest what to do next.

answered