# Query Binding - java.lang.exception - required parameter not provided

**URL:** <https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104>\
**Category:** Ignition\
**Tags:** database, perspective\
**Created:** [April 19, 2024, 12:12pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104 "2024-04-19T12:12:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc.Akoto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marc.akoto/32/19291_2.png) [@Marc.Akoto](https://forum.inductiveautomation.com/u/Marc.Akoto)\
**Post date:** [April 19, 2024, 12:12pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/1 "2024-04-19T12:12:17Z")

</div>

Ignition 8.1.28 - In a Perspective view  
Below a picture

I've got 2 query bindings, with the same parameter "dbConnection" pointing the query to the right database name.

One query is working, but the other one is throwing an error :

- java.lang.exception: required parameter 'database' not provided

Did you ever encounter anything similar ?

 ![select_query_bindings](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/3/33b9520923a2ee50a91f904900c9cb47bee1c9a3.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 19, 2024, 1:02pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/2 "2024-04-19T13:02:25Z")

</div>

Are you sure `{this.custom.dbConnection}` is always populated?

---

<div class="post-metadata">

**Author:** ![Marc.Akoto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marc.akoto/32/19291_2.png) [@Marc.Akoto](https://forum.inductiveautomation.com/u/Marc.Akoto)\
**Post date:** [April 19, 2024, 1:19pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/3 "2024-04-19T13:19:37Z")

</div>

I guess it is always populated, and the first query binding is detecting it correctly ...

![dbConnection](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/f/1f8a9ef713c57e246b242fdd3d711a4b6e164068.png)

---

<div class="post-metadata">

**Author:** ![Marc.Akoto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marc.akoto/32/19291_2.png) [@Marc.Akoto](https://forum.inductiveautomation.com/u/Marc.Akoto)\
**Post date:** [April 19, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/4 "2024-04-19T13:33:23Z")

</div>

- I deleted both the binding and the named query
- I created them both again  
and now for some reason it's working 🤷‍♂️

---

<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:** [April 19, 2024, 2:25pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/5 "2024-04-19T14:25:41Z")

</div>

There's a bug in pretty recent versions - any chance you had a named query at the root with the exact same name as a named query in one or more folders?

---

<div class="post-metadata">

**Author:** ![Marc.Akoto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marc.akoto/32/19291_2.png) [@Marc.Akoto](https://forum.inductiveautomation.com/u/Marc.Akoto)\
**Post date:** [April 19, 2024, 3:13pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/6 "2024-04-19T15:13:28Z")

</div>

@paul-griffith yes I have several folders for each database type (MSSQL, MySQL, SQLite, ...) and in each folder, the names of the named queries are the same

---

<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:** [April 19, 2024, 3:17pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/7 "2024-04-19T15:17:36Z")

</div>

If you upgrade to 8.1.37 or later, the inconsistent behavior will be fixed.

---

<div class="post-metadata">

**Author:** ![Marc.Akoto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marc.akoto/32/19291_2.png) [@Marc.Akoto](https://forum.inductiveautomation.com/u/Marc.Akoto)\
**Post date:** [April 19, 2024, 3:19pm UTC](https://forum.inductiveautomation.com/t/query-binding-java-lang-exception-required-parameter-not-provided/89104/8 "2024-04-19T15:19:54Z")

</div>

GW upgraded, thanks !
