# system.db.runNamedQuery() problem on client

**URL:** <https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709>\
**Category:** Ignition\
**Created:** [May 13, 2020, 4:42pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709 "2020-05-13T16:42:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 4:42pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/1 "2020-05-13T16:42:12Z")

</div>

I’m using this function on Designer and it works. When I save the project and start the client it won’t work.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/2a8e7359528598098567556a27d7fa2c8cc14e26.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 13, 2020, 4:47pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/2 "2020-05-13T16:47:25Z")

</div>

> [@roberto.buompane](#):
>
> When I save the project and start the client it won’t work.

What does not working mean? It's returning the wrong results, or no results? Or is it throwing an error? If it's throwing an error, what's the full details of the error? What version of Ignition is this?

---

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 4:52pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/3 "2020-05-13T16:52:58Z")

</div>

This is the error:

Traceback (most recent call last):

File “event:actionPerformed”, line 10, in

com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Named query LoroPiana/getLottiList not found

```
caused by GatewayException: Named query Folder/getLottiList not found
caused by GatewayFunctionException: Named query LoroPiana/getLottiList not found

```

Ignition v7.9.13 (b2019120915)  
Java: Oracle Corporation 1.8.0\_251

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 13, 2020, 4:53pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/4 "2020-05-13T16:53:54Z")

</div>

Does your project have manual publishing enabled? Maybe you’ve saved the named query, but not published it? That would let it work in the designer, but not clients.

---

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 4:53pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/5 "2020-05-13T16:53:59Z")

</div>

Traceback (most recent call last):

File “event:actionPerformed”, line 10, in

com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Named query LoroPiana/getLottiList not found

```
caused by GatewayException: Named query LoroPiana/getLottiList not found
caused by GatewayFunctionException: Named query LoroPiana/getLottiList not found

```

Ignition v7.9.13 (b2019120915)  
Java: Oracle Corporation 1.8.0\_251

---

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 4:56pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/6 "2020-05-13T16:56:08Z")

</div>

I’ve imported it from another project… maybe I have to publish it. How can I do?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 13, 2020, 5:22pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/7 "2020-05-13T17:22:08Z")

</div>

![pub](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/cf7dfc12af1552a7f8768c790251f7faeea6f94f.png)

---

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 7:42pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/8 "2020-05-13T19:42:22Z")

</div>

Thanks to all, I’ve understood and checked but "Publish mode is “Auto”, therefore when project is saved is also automatically published.  
This is the code in a script :

 ![img1](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/320c660d59834944bf1265de1fa52812c3fc15da.png)

and this is the Named Query:  
 ![img2](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7b0a5069b40db82b4639fc5d21f34d574f146b6d.png)

If executed in the Designer it works perfectly, but after saved the project and published, the query won’t be executed leaving an error message as below:

Traceback (most recent call last):

File “event:actionPerformed”, line 10, in

com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Named query LoroPiana/getLottiList not found

```
caused by GatewayException: Named query LoroPiana/getLottiList not found
caused by GatewayFunctionException: Named query LoroPiana/getLottiList not found

```

Ignition v7.9.13 (b2019120915)  
Java: Oracle Corporation 1.8.0\_251

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 13, 2020, 8:25pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/9 "2020-05-13T20:25:03Z")

</div>

Try

```auto
DS=system.db.runNamedQuery("ProjectName", path, params)

```

note also capitalisation, the g in get should be Get for GetLottiList

---

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 8:50pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/10 "2020-05-13T20:50:44Z")

</div>

I’ve tried this :

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d546a8cccbf8e762f61b83e6345bb319aadecb81.png)

but it doesn’t work  
this is the error :

Traceback (most recent call last):

File “event:actionPerformed”, line 10, in

java.lang.ClassCastException: java.lang.ClassCastException: Cannot coerce value ‘LoroPiana/getLottiList’ into type: interface java.util.Map

```
caused by ClassCastException: Cannot coerce value 'LoroPiana/getLottiList' into type: interface java.util.Map

```

Ignition v7.9.13 (b2019120915)  
Java: Oracle Corporation 1.8.0\_251

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 13, 2020, 8:54pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/11 "2020-05-13T20:54:56Z")

</div>

If it works in designer I don’t think this is the cause, but worth a try, fix that capital G

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 13, 2020, 8:57pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/12 "2020-05-13T20:57:43Z")

</div>

OK so think that error is _caused_ by adding the project name.

Where/how are you calling the script?

Fix the G regardless

---

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [May 13, 2020, 9:11pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-problem-on-client/34709/13 "2020-05-13T21:11:22Z")

</div>

Solved!!!  
A very stupid error but strange behavior:  
I named the query getLottiList but I wrote GetLottiList in the function; in Designer worked fine but not in the client.

Thanks a lot Matrix\_Engineering!!
