# The \[0.0.0\] version of the \[jdbc\] client is not compatible with Elasticsearch version \[7.10.0\];\]

**URL:** <https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462>\
**Category:** Elasticsearch\
**Created:** [March 17, 2021, 9:49am UTC](https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462 "2021-03-17T09:49:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yxmm-wxe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yxmm-wxe/32/85667_2.png) [@yxmm-wxe](https://discuss.elastic.co/u/yxmm-wxe)\
**Post date:** [March 17, 2021, 9:49am UTC](https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462/1 "2021-03-17T09:49:27Z")

</div>

Hello, everyone, I have a strange problem with the JDBC driver version after packaging.

```xml
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-sql-jdbc</artifactId>
    <version>7.10.0</version>
</dependency>

```

When I run my code in IDEA to access elasticsearch, it works normally.

Next, I execute `mvn package` to get a jar **with dependencies**.  
When I run this jar to access elasticsearch, the error is as follows:

```bash
java.sql.SQLException: Server sent bad type [action_request_validation_exception]. Original type was [Validation Failed: 1: The [0.0.0] version of the [jdbc] client is not compatible with Elasticsearch version [7.10.0];]. [org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: The [0.0.0] version of the [jdbc] client is not compatible with Elasticsearch version [7.10.0];
        at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:26)
        at org.elasticsearch.xpack.sql.action.AbstractSqlQueryRequest.validate(AbstractSqlQueryRequest.java:239)
        at org.elasticsearch.xpack.sql.action.SqlQueryRequest.validate(SqlQueryRequest.java:79)
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:144)
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:83)
        at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:86)
        at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:75)
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:412)
        at org.elasticsearch.xpack.sql.plugin.RestSqlQueryAction.lambda$prepareRequest$0(RestSqlQueryAction.java:116)
        at org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:115)
        at org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleRequest(SecurityRestFilter.java:88)
        at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:258)
        at org.elasticsearch.rest.RestController.tryAllHandlers(RestController.java:340)
        at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:191)
        at org.elasticsearch.http.AbstractHttpServerTransport.dispatchRequest(AbstractHttpServerTransport.java:319)
        at org.elasticsearch.http.AbstractHttpServerTransport.handleIncomingRequest(AbstractHttpServerTransport.java:384)
......

```

I guess that there was a problem with the version metadata when packaging, but I didn't found a solution.

Otherwise, I found some source code of Elasticsearch that may be useful.

[elasticsearch/ClientVersion.java at master · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/sql/sql-client/src/main/java/org/elasticsearch/xpack/sql/client/ClientVersion.java#L112)

---

<div class="post-metadata">

**Author:** ![yxmm-wxe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yxmm-wxe/32/85667_2.png) [@yxmm-wxe](https://discuss.elastic.co/u/yxmm-wxe)\
**Post date:** [March 18, 2021, 5:44am UTC](https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462/2 "2021-03-18T05:44:45Z")

</div>

According to [elasticsearch/ClientVersion.java at master · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/sql/sql-client/src/main/java/org/elasticsearch/xpack/sql/client/ClientVersion.java#L112)

I add the following configuration to pom.xml, and the issue is solved.

```xml
<manifestEntries>
    <X-Compile-Elasticsearch-Version>7.10.0</X-Compile-Elasticsearch-Version>
</manifestEntries>

```

---

<div class="post-metadata">

**Author:** ![bogdan.pintea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan.pintea/32/45740_2.png) [@bogdan.pintea](https://discuss.elastic.co/u/bogdan.pintea)\
**Post date:** [March 18, 2021, 9:00am UTC](https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462/3 "2021-03-18T09:00:55Z")

</div>

Hi @yxmm-wxe,

> [@yxmm-wxe](#):
>
> Hello, everyone, I have a strange problem with the JDBC driver version after packaging.

Glad that it eventually works for you now.

Just in case, if you [download](https://repo.maven.apache.org/maven2/org/elasticsearch/plugin/x-pack-sql-jdbc/7.10.0/x-pack-sql-jdbc-7.10.0.jar) the driver manually and unzip it you can see that the `X-Compile-Elasticsearch-Version` is already there. So I imagine that for some reason rather the manifest [can't be read](https://github.com/elastic/elasticsearch/blob/a35cc101a627f080ddfaf01057f3ca5010f3e199/x-pack/plugin/sql/sql-client/src/main/java/org/elasticsearch/xpack/sql/client/ClientVersion.java#L81) in your setup.  
Feel free to provide some more details about how it's being run, if you want to pursuit it further, but if you're already happy with your fix, then all good.

---

<div class="post-metadata">

**Author:** ![yxmm-wxe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yxmm-wxe/32/85667_2.png) [@yxmm-wxe](https://discuss.elastic.co/u/yxmm-wxe)\
**Post date:** [March 30, 2021, 9:52am UTC](https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462/4 "2021-03-30T09:52:28Z")

</div>

Thank you for your answer.

My issue is because the Elasticsearch jdbc driver is packaged to my final jar, and the MANIFEST.MF is missing.  
As you know, the `X-Compile-Elasticsearch-Version` is defined in MANIFEST.MF.

Finally, I choose to load the driver dynamically. And my previous solution was not reasonable.

---

<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:** [April 27, 2021, 9:52am UTC](https://discuss.elastic.co/t/the-0-0-0-version-of-the-jdbc-client-is-not-compatible-with-elasticsearch-version-7-10-0/267462/5 "2021-04-27T09:52:30Z")

</div>

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