# PostgreSQL JDBC driver trouble for river plugin

**URL:** <https://discuss.elastic.co/t/postgresql-jdbc-driver-trouble-for-river-plugin/10229>\
**Category:** Elasticsearch\
**Created:** [January 4, 2013, 3:54pm UTC](https://discuss.elastic.co/t/postgresql-jdbc-driver-trouble-for-river-plugin/10229 "2013-01-04T15:54:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randel/32/2541_2.png) [@randel](https://discuss.elastic.co/u/randel)\
**Post date:** [January 4, 2013, 3:54pm UTC](https://discuss.elastic.co/t/postgresql-jdbc-driver-trouble-for-river-plugin/10229/1 "2013-01-04T15:54:11Z")

</div>

I installed the elasticsearch-river-jdbc/1.3.2 by downloading the zip from [https://github.com/jprante/elasticsearch-river-jdbc/downloads](https://github.com/jprante/elasticsearch-river-jdbc/downloads) and installed by 'sudo ./bin/plugin -url file:///home/randel/elasticsearch-river-jdbc/elasticsearch-river-jdbc-1.3.2.zip -install river-jdbc'

Than I checked what JVM version is installed: 1.6 and downloaded the jdbc4-PostgreSQL driver from [http://jdbc.postgresql.org/download.html](http://jdbc.postgresql.org/download.html). I copied it to /usr/share/elasticsearch/plugins/river-jdbc as well as /usr/share/elasticsearch/lib/.

Restarting shows:  
[2013-01-04 16:48:44,222][INFO][node] [Hyperstorm] {0.20.2}[11710]: initializing ...  
[2013-01-04 16:48:44,231][INFO][plugins] [Hyperstorm] loaded [jdbc-river], sites []  
[2013-01-04 16:48:46,144][INFO][node] [Hyperstorm] {0.20.2}[11710]: initialized  
[2013-01-04 16:48:46,144][INFO][node] [Hyperstorm] {0.20.2}[11710]: starting ...  
[2013-01-04 16:48:46,217][INFO][transport] [Hyperstorm] bound\_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish\_address {inet[/46.163.73.84:9300]}  
[2013-01-04 16:48:49,244][INFO][cluster.service] [Hyperstorm] new\_master [Hyperstorm][CVLc5UcwS2qJSlSh3Ibu3A][inet[/46.163.73.84:9300]], reason: zen-disco-join (elected\_as\_master)  
[2013-01-04 16:48:49,273][INFO][discovery] [Hyperstorm] elasticsearch/CVLc5UcwS2qJSlSh3Ibu3A  
[2013-01-04 16:48:49,289][INFO][http] [Hyperstorm] bound\_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address {inet[/46.163.73.84:9200]}  
[2013-01-04 16:48:49,289][INFO][node] [Hyperstorm] {0.20.2}[11710]: started  
[2013-01-04 16:48:49,325][INFO][gateway] [Hyperstorm] recovered [0] indices into cluster\_state

but when I issue:  
curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "org.postgresql.Driver",  
"url" : "jdbc.postgresql://localhost:5432/testdb",  
"user" : "",  
"password" : "",  
"sql" : "select \* from infolist"  
}  
}'

I get:  
{"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":1}

and in the log:  
[2013-01-04 16:50:15,466][INFO][cluster.metadata] [Hyperstorm] [\_river] creating index, cause [auto(index api)], shards [1]/[1], mappings []  
[2013-01-04 16:50:16,789][INFO][cluster.metadata] [Hyperstorm] [\_river] update\_mapping [my\_jdbc\_river] (dynamic)  
[2013-01-04 16:50:16,808][INFO][river.jdbc] [Hyperstorm] [jdbc][my\_jdbc\_river] starting JDBC connector: URL [jdbc.postgresql://localhost:5432/testdb], driver [org.postgresql.Driver], sql [select \* from infolist], river table [false], indexing to [jdbc]/[jdbc], poll [1h]  
[2013-01-04 16:50:16,839][INFO][cluster.metadata] [Hyperstorm] [jdbc] creating index, cause [api], shards [5]/[1], mappings []  
[2013-01-04 16:50:17,030][INFO][cluster.metadata] [Hyperstorm] [\_river] update\_mapping [my\_jdbc\_river] (dynamic)  
[2013-01-04 16:50:17,030][ERROR][river.jdbc] No suitable driver found for jdbc.postgresql://localhost:5432/testdb  
java.sql.SQLException: No suitable driver found for jdbc.postgresql://localhost:5432/testdb  
at java.sql.DriverManager.getConnection(DriverManager.java:640)  
at java.sql.DriverManager.getConnection(DriverManager.java:200)  
at org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:103)  
at org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)  
at java.lang.Thread.run(Thread.java:679)

What is going wrong here? The driver is readable by everyone. Do I need to rename it or something?

---

<div class="post-metadata">

**Author:** ![randel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randel/32/2541_2.png) [@randel](https://discuss.elastic.co/u/randel)\
**Post date:** [January 5, 2013, 12:59pm UTC](https://discuss.elastic.co/t/postgresql-jdbc-driver-trouble-for-river-plugin/10229/2 "2013-01-05T12:59:46Z")

</div>

Question answered, it is jdbc **:** postgresql not jdbc **.** postgresql

---

<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 6, 2017, 2:57am UTC](https://discuss.elastic.co/t/postgresql-jdbc-driver-trouble-for-river-plugin/10229/3 "2017-07-06T02:57:47Z")

</div>


