Named Queries Not Working

Ignition Version: 7.9.12
Gateway PC: CentOS Linux 7. Zulu 8.40
MySQL on the Gateway PC Version: 5.7.27
Client PC: Windows 10. Zulu 8.38

The problem I’m facing is that no named queries are working. I even have a named query that doesn’t have any parameters defined. I can browse my database tables just fine in the Database Query Browser.

Here’s a query that works in the Database Query Browser, but not as a Named Query:

SELECT UUID()

For Client Permissions, I’ve enabled ‘Legacy Database Access’ and added the required client roles. All Database Connections are valid. I have this same project setup in a few other locations and they work perfectly fine.

In the ignition.sh file, RUN_AS_USER = ac2admin. Same as hostname. In /etc/systemd/system/Ignigiont-Gateway.service the User=ac2admin. Not sure that helps.

Here’s my error message:

Unable to read response from Gateway.

Compact

GatewayException: Unable to read response from Gateway.
	caused by org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 11; The end-tag for element type "Response" must end with a '>' delimiter.
Ignition v7.9.12 (b2019070213)
Java: Azul Systems, Inc. 9.0.7.2

Full

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:341)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:445)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:273)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:268)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:894)
	at com.inductiveautomation.ignition.designer.db.namedquery.workspace.NamedQueryTestingPanel$5$1.doInBackground(NamedQueryTestingPanel.java:321)
	at com.inductiveautomation.ignition.designer.db.namedquery.workspace.NamedQueryTestingPanel$5$1.doInBackground(NamedQueryTestingPanel.java:300)
	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 11; The end-tag for element type "Response" must end with a '>' delimiter.
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:443)
	... 11 more

Ignition v7.9.12 (b2019070213)
Java: Azul Systems, Inc. 9.0.7.2

Can you download Wireshark or something similar, and PM me (or contact support with) a capture of traffic from the clientside? Something is happening to the serialized response the gateway’s sending to the client which is causing it to break, but there’s not really any way to see that without inspecting the actual network traffic.

Yikes. Okay, I can do that. Thanks for the help.

To quote Paul in a message to me:

Hmm, so, the error message you’re getting on the designer/client side is actually caused by (ironically) us throwing a different error on the gateway side; we’re serializing that error and handing it back, and then the XML is failing to decode that. Packet 874 is the request, 883 is the response. Note the exception message:
<ExceptionMsg>Named query Recipe/ListRecipes_allGroups not found</ExceptionMsg>

I have exported the project, renamed the project, then imported it, and the Named Queries still don’t work.

At this point, I think getting on contact with support is your best bet. There’s some things they can do on a live system that I’m not comfortable trying to talk through via the forums.

1 Like

Same Issue :frowning:

Contact support