# JDBC Driver From Maven

**URL:** <https://discuss.elastic.co/t/jdbc-driver-from-maven/136736>\
**Category:** Elasticsearch\
**Created:** [June 20, 2018, 4:53pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736 "2018-06-20T16:53:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gboro54](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@gboro54](https://discuss.elastic.co/u/gboro54)\
**Post date:** [June 20, 2018, 4:53pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/1 "2018-06-20T16:53:46Z")

</div>

I have tried following the directions provided in the documentation and yet still can't seem to get the MVN dependency for the new JDBC jar to work. AM I potentially missing something?

```
              <dependency>
		<groupId>org.elasticsearch.plugin.jdbc</groupId>
		<artifactId>jdbc</artifactId>
		<version>6.3.0</version>
	</dependency>
```

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [June 20, 2018, 6:12pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/2 "2018-06-20T18:12:17Z")

</div>

Did you add [artifacts.elastic.co/maven](http://artifacts.elastic.co/maven) to your repositories list?

Also, just as an FYI, you can get the jar from a regular/non-maven download at [https://www.elastic.co/downloads/jdbc-client](https://www.elastic.co/downloads/jdbc-client)

---

<div class="post-metadata">

**Author:** ![gboro54](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@gboro54](https://discuss.elastic.co/u/gboro54)\
**Post date:** [June 20, 2018, 6:15pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/3 "2018-06-20T18:15:48Z")

</div>

Yes. I added the repo:

```
<repositories>
	<repository>
		<id>apache.snapshots</id>
		<name>Apache Development Snapshot Repository</name>
		<url>https://repository.apache.org/content/repositories/snapshots/</url>
		<releases>
			<enabled>false</enabled>
		</releases>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
	<repository>
		<id>elastic.co</id>
        <name>Elastic Repository</name>
		<url>https://artifacts.elastic.co/maven</url>
	</repository>

</repositories>

```

Yes I know I can get them from the site which is fine for some local testing but obviously I don't want to check in jars or have others have to get dependencies when checking out my code

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [June 20, 2018, 6:30pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/4 "2018-06-20T18:30:53Z")

</div>

I believe the group and artifact id are wrong. They should be:

```auto
		<groupId>org.elasticsearch.plugin</groupId>
		<artifactId>x-pack-sql-jdbc</artifactId>

```

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [June 20, 2018, 6:41pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/5 "2018-06-20T18:41:10Z")

</div>

@gboro54 there's a documentation issue here that we need to fix. Thanks for raising it!

---

<div class="post-metadata">

**Author:** ![gboro54](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@gboro54](https://discuss.elastic.co/u/gboro54)\
**Post date:** [June 20, 2018, 7:10pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/6 "2018-06-20T19:10:49Z")

</div>

is 6.3.0 still the version number? With the below Im still getting an inability to resolve:

```
<repositories>
    <repository>
        <id>elastic.co</id>
        <name>Elastic Repository</name>
        <url>https://artifacts.elastic.co/maven</url>
    </repository>

</repositories>
<dependencies>
    <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>x-pack-sql-jdbc</artifactId>
        <version>6.3.0</version>
    </dependency>
</dependencies>
```

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [June 21, 2018, 2:10pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/7 "2018-06-21T14:10:27Z")

</div>

Hi @gboro54,

Sorry for your troubles.  
The answer above is correct but the upcoming versions (6.4 and higher).  
For 6.3 please use:

```
 <dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>jdbc</artifactId>
    <version>6.3.0</version>
</dependency>

```

while from 6.4 and higher (when they will be released), change only the artifactId:

```
 <dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-sql-jdbc</artifactId>
    <version>{future.version}</version>
</dependency>

```

Sorry for the confusion.  
The JDBC jar in 6.4 has been significantly reduced in size and that's why it will have a different name when it will be released.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![gboro54](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@gboro54](https://discuss.elastic.co/u/gboro54)\
**Post date:** [June 21, 2018, 4:54pm UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/8 "2018-06-21T16:54:22Z")

</div>

Do you have a working POM for 6.3 I can see? I tried using the first one in your example with the repo set and Im still getting the unresolved dependency. I want to make sure that Im not missing something else in my POM or if its proxy on my network

---

<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:** [June 25, 2018, 9:00am UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/9 "2018-06-25T09:00:59Z")

</div>

Hi @gboro54,  
I just tested this with the following pom:

```auto
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>test_jdbc_driver_Maven</groupId>
	<artifactId>test_jdbc_driver_Maven</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<build>
		<sourceDirectory>src</sourceDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
	<dependencies>
		<dependency>
			<groupId>org.elasticsearch.plugin</groupId>
			<artifactId>jdbc</artifactId>
			<version>6.3.0</version>
		</dependency>
	</dependencies>

	<repositories>
		<repository>
			<id>elastic.co</id>
			<name>Elastic Repository</name>
			<url>https://artifacts.elastic.co/maven</url>
		</repository>
	</repositories>
</project>

```

Side-note: I tested this in Eclipse and, at first, I didn't have set the repository and a warning was present in the Error log. That warning persisted there even after I added the correct repository. These being said, the Dependency Tree in Eclipse was showing the correct list of dependencies for the jdbc jar though. I cleared the Error log, rebuild the project and the warning was gone.

How does this issue manifest itself in your case? Is the jdbc jar actually downloaded?

---

<div class="post-metadata">

**Author:** ![gboro54](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@gboro54](https://discuss.elastic.co/u/gboro54)\
**Post date:** [June 25, 2018, 9:49am UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/10 "2018-06-25T09:49:36Z")

</div>

Thanks. I actually meant to update the thread but the problem was with my maven settings using an internal nexus repo to try and resolve the dependency.

---

<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:** [July 23, 2018, 9:49am UTC](https://discuss.elastic.co/t/jdbc-driver-from-maven/136736/11 "2018-07-23T09:49:36Z")

</div>

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