PostgreSQL integration

Try to put postgresql jar in es lib dir. And restart ES.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 août 2012 à 21:58, DavidLR davidlreiff@gmail.com a écrit :

I cannot get this going with postgresql 9.1, I only get the error "no suitable driver found for postgresql.
I know nothing about java...
I downloaded the postgresql jdbc4 driver from here: http://jdbc.postgresql.org/
extracted it and put the postgresql-9.1-902.jdbc.jar file in /usr/share/elasticsearch/plugins/river_jdbc which is where the elasticsearch-river-jdbc-1.3.2.jar file is.
My curl is

curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"driver" : "org.postgresql.Driver",
"url" : "jdbc.postgresql://localhost:5432/test",
"username" : "username",
"password" : "password",
"sql" : "select * from everything"
},
"index" : {
"index" : "jdbc",
"type" : "jdbc"
}
}'

and I always get back this error

[ERROR][river.jdbc ] No suitable driver found for postgresql://localhost:5432/nibbel
java.sql.SQLException: No suitable driver found for postgresql://localhost:5432/test
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:103)
at org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)

Any ideas? Again I know nothing about java but was hoping to index and search postgresql databases with elasticsearch.
Thanks

--

--

1 Like