Error while retrieving data when switching pages

0
Hello, Since I have updated my application from 8.1 to 8.6, I get an error when I go to a page with a ListView. All my pages have the same structure as described in the image below. DataView entity Settings is retrieved by a microflow. DataView entity Customer is retrieved over association to entity Settings. ListView entity Item is retrieved with an XPath and over association to entity Customer, where Customer is the %CurrentObject% in the xPath. The ListView has some ListViewControls, which do search and sort over XPath.   When I go from Page A to Page B, I get the following error (I have changed the names of the page, widget and association, nothing else): com.mendix.webui.WebUIException: Exception while retrieving data for a widget 'DataView Settings' on page 'PageName' at com.mendix.webui.actions.client.RetrieveAction.$anonfun$apply$3(RetrieveAction.scala:69) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{}', all database changes executed by this action were rolled back at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:151) Caused by: java.lang.IllegalArgumentException: requirement failed: object 'Settings' does not have association 'Item_Customer'. When I go first to Page A, it works fine. But it seems that when I go to Page B, the ListView XPath constraints (or the constraints of the related widgets) does not go to the Customer object, but go to the Settings object. So the XPath “keeps hanging” while the CurrentObject changes... How can I solve this? Thanks for your help!
asked
4 answers
0

You could check your domain model to see how the access rights are configured. The final line in the stacktrace mentions that there is no association found between your settings object and the customer.

When you switch from one page to another, and the user has no read rights for the association, Mendix will not show this data, even though it might appear to be there on the page of origin.

answered
0

In my experience this happens when there are widgets with the same name on both pages, like listView1 or dataView1. When making these names more unique like listViewCustomer and listViewOrders the errors went away.

answered
0

Yesterday I ran into a similar error message, so like

Caused by: java.lang.IllegalArgumentException: requirement failed: object '…' does not have association '…'.


The setting I got this error in is somewhat different than yours, but perhaps this comment can help you solving your specific issue.

During the Mx-upgrade 7.23.2 → 7.23.19 this error was generated when showing a page with the following characteristics:

- page contains several dataviews for different specializations (all in a quite complex structure with only snippets for reusability)
- some of those dataviews contains a reference selector

Such a reference selector on a specialization which is not shown on the page (so let's say, a damage claim (generalization) is of a certain producttype (say liability, building, or travel; the specialization), then when showing a liability claim, this causes an error when on the same page in the model there is a dataview (say building) with a reference selector widget.

Removing the reference selector was no option of course, so the only way to solve it was, to create separate pages for every specialization, what perhaps was a good idea anyway.

It seems like a bug in Mx which caused this issue. Until Mx 7.23.2 we didn't encounter this issue.  

answered
0

I've contacted Mendix about this issue, and they looked into it. The problem was known to them and it has been fixed in version 8.11.0. If you look at the release notes there is the following paragraph:

When you had a page with a lot of widgets and were moving to another page or the page was rebuilt because the data sources were returning different objects, this resulted in an error in the client. We fixed this and improved performance along the way. (Ticket 98603)

I have updated the modeler and it seems indeed the solution.

answered