# JDBC Driver issues

**URL:** <https://discuss.elastic.co/t/jdbc-driver-issues/197732>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [September 2, 2019, 7:18pm UTC](https://discuss.elastic.co/t/jdbc-driver-issues/197732 "2019-09-02T19:18:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ubi](https://avatars.discourse-cdn.com/v4/letter/u/b782af/32.png) [@ubi](https://discuss.elastic.co/u/ubi)\
**Post date:** [September 2, 2019, 7:18pm UTC](https://discuss.elastic.co/t/jdbc-driver-issues/197732/1 "2019-09-02T19:18:44Z")

</div>

I'm currently facing issues while using the [Elastic Cloud](https://www.elastic.co/pt/cloud/) in conjunction with the latest JDBC Driver(7.3.1).

Dispatching queries works, however, sometimes when sending a high amount of queries simultaneously, i'll receive the following error:

```auto
An error occurred executing SQL:
SELECT way, abbreviation, SCORE() FROM cep WHERE MATCH('way,abbreviation', 'this is a query', 'fuzziness=AUTO') AND city = 'this is a query' AND state = 'this is a query' ORDER BY SCORE() DESC LIMIT 1
Cannot POST address {{omitted for the forums}}/_sql?error_trace (No route to host(Host unreachable))

```

Wich is odd, since this endpoint is getting called anyways since i'm using the JDBC driver.  
The stacktrace itself returns:

```auto
{"error":{"root_cause":[{"type":"parse_exception","reason":"request body or source parameter is required","stack_trace":"ElasticsearchParseException[request body or source parameter is required]...[truncated]

```

I checked the queries being dispatched and there is no empty body, afterwards, the whole connection closes:

```auto
Caused by: java.sql.SQLException: org.apache.commons.dbcp.DelegatingStatement with address: "org.elasticsearch.xpack.sql.jdbc.JdbcStatement@551657d8" is closed.

```

Thank you for the support.

---

<div class="post-metadata">

**Author:** ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)\
**Post date:** [September 3, 2019, 1:29pm UTC](https://discuss.elastic.co/t/jdbc-driver-issues/197732/2 "2019-09-03T13:29:53Z")

</div>

@ubi couple of things here:

- there is no need (and doesn't make a difference if using) for dbcp pooling, as the ES SQL connections don't have state and you do not save on resources if you are reusing a connection. I suggest removing the dbcp layer.
- "high amount of queries simultaneously" - what values are we talking about?
- can you post the complete stacktrace for the "No route to host" error?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 1, 2019, 1:29pm UTC](https://discuss.elastic.co/t/jdbc-driver-issues/197732/3 "2019-10-01T13:29:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
