Offline search grid Connector error

0
Hi all, We want to implement the Offline Search Grid widget in our project. But after implementing the widget, we get the following error if we try to type something in the search field:  com.mendix.core.CoreRuntimeException: Exception occurred in action '{"xpath":"//Inspectie.Inspectie[Inspectie.Inspectie_Assignee=\"10414574138294373\"][object Object]","amount":10,"offset":0,"returnsCount":true,"sort":[{"memberName":"DatumTijd_Aangemaakt","direction":{}}],"type":"RetrieveXPathSchemaRawAction"}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:155) Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): InternalLimitedXPathTextGetRequest (depth = -1, amount = 10): //Inspectie.Inspectie[Inspectie.Inspectie_Assignee="10414574138294373"][object Object] at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:62) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Input '//Inspectie.Inspectie[Inspectie.Inspectie_Assignee="10414574138294373"][object Object]' could not be parsed Error on line 1 character 79: no viable alternative at input 'Object' at com.mendix.languages.ASTBuilder$class.processRecognitionExceptions(ASTBuilder.scala:34) at com.mendix.languages.ASTBuilder$class.process$1(ASTBuilder.scala:14) at com.mendix.languages.ASTBuilder$$anonfun$processRecognitionExceptions$1.apply(ASTBuilder.scala:17) at com.mendix.languages.ASTBuilder$$anonfun$processRecognitionExceptions$1.apply(ASTBuilder.scala:16) at scala.collection.immutable.List.foreach(List.scala:381) at com.mendix.languages.ASTBuilder$class.processRecognitionExceptions(ASTBuilder.scala:16) at com.mendix.languages.mxpath.MxPathASTBuilder.processRecognitionExceptions(MxPathASTBuilder.scala:21) at com.mendix.languages.mxpath.MxPathASTBuilder.buildMxPathQueryAST(MxPathASTBuilder.scala:30) at com.mendix.queryparser.xpath.XPathToOqlConverter.convert(XPathToOqlConverter.java:102) at com.mendix.queryparser.QueryParserImpl.parseXPathQuery(QueryParserImpl.scala:49) at com.mendix.connectionbus.retrieve.requests.InternalLimitedXPathTextGetRequest.getSuitableRequest(InternalLimitedXPathTextGetRequest.scala:14) at com.mendix.connectionbus.retrieve.GetRequestHandler.doRequest(GetRequestHandler.java:62) at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:48) at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:471) at com.mendix.basis.action.user.RetrieveXPathSchemaRawAction.retrieveXPathSchemaRaw(RetrieveXPathSchemaRawAction.java:162) at com.mendix.basis.action.user.RetrieveXPathSchemaRawAction.executeAction(RetrieveXPathSchemaRawAction.java:130) at com.mendix.basis.action.user.RetrieveXPathSchemaRawAction.executeAction(RetrieveXPathSchemaRawAction.java:26) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.webui.actions.client.RetrieveByXPathAction.retrieve(RetrieveByXPathAction.scala:97) at com.mendix.webui.actions.client.RetrieveByXPathAction.execute(RetrieveByXPathAction.scala:58) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:315) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:300) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49) at com.mendix.webui.requesthandling.ClientRequestHandler$ClientMonitoredAction.monitor(ClientRequestHandler.scala:418) at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler.handleActionWithSessionRequired(ClientRequestHandler.scala:238) at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:205) at com.mendix.webui.requesthandling.ClientRequestHandler.liftedTree1$1(ClientRequestHandler.scala:104) at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:96) at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:70) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:67) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73) at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:876) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:41) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:748) Anyone has any clue what could cause this error and how to solve it?   
asked
1 answers
1

Ward,

Without additional information on the exact setup of your version I was not able to replicate the issue exactly, but the widget is quite difficult to get correct.

It seems you are trying to search for data over an association. This will work when using the contains option, but not for the equals in my case below.

I have 2 entities:

1) Inspectie

2) Entity

They have a many to 1 relation Inspectie_Entity.

To search for the attribute (named Attribute) on the Entity entity the following config of the widget will work and search for the right objects:

In the List view entity I added the relation from my Inspectie entity to the associated entity.

If you change the search option to equals an error is thrown like below:

com.mendix.core.CoreRuntimeException: Exception occurred in action '{"xpath":"//MyFirstModule.Inspectie[MyFirstModule.Inspectie_Entity/MyFirstModule.Entity[equals(Attribute,'B')]]","amount":10,"offset":0,"returnsCount":true,"sort":[],"type":"RetrieveXPathSchemaRawAction"}', all database changes executed by this action were rolled back

And if you look further down it seems that the xpath can't be understood by the Mendix business server:

Caused by: java.lang.RuntimeException: Unknown predicate function: equals

I don't think this last part is the same error that you are getting, but your error is in the configuration of the widget.

Please compare the config with the one depicted above and make sure to have the latest version of the widget in your project.

answered