# JDBC River can not started

**URL:** <https://discuss.elastic.co/t/jdbc-river-can-not-started/8461>\
**Category:** Elasticsearch\
**Created:** [July 19, 2012, 4:17am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461 "2012-07-19T04:17:51Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arthur\_Pan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Arthur\_Pan](https://discuss.elastic.co/u/Arthur_Pan)\
**Post date:** [July 19, 2012, 4:17am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/1 "2012-07-19T04:17:51Z")

</div>

Hi,  
I installed JDBC River and restart the elasticsearch. when I create a new river, it cat not started.  
There are some error message in the elasticsearch.log.

[2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf] [jdbc][my\_jdbc\_river] starting JDBC connector: URL [jdbc:mysql://192.168.1.100:3306/forum], driver [com.mysql.jdbc.Driver], sql [select "index" as "\_index", id as "\_id",topic.\* from topic where group\_topic\_type=0 and hidden=0 and active=1], river table [false], indexing to [jdbc]/[jdbc], poll [1m]  
[2012-07-19 11:10:34,585][ERROR][river.jdbc] com.mysql.jdbc.Driver  
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
at java.lang.Class.forName0(Native Method)  
at java.lang.Class.forName(Class.java:186)  
at org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)  
at org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)  
at java.lang.Thread.run(Thread.java:722)

I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the same situation.

what is missing for it? how can I to do?

Thanks,  
Arthur

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2012, 8:30am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/2 "2012-07-20T08:30:43Z")

</div>

As far as I understand the plugin.xml file, the JDBC river does not provide the  
JDBC driver for all vendors and all versions !  
So, I think you have to add your MySQL driver jar in the elasticsearch classpath  
before launching the node.

HTH  
David.

Le 19 juillet 2012 à 06:17, arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :

> Hi,  
> I installed JDBC River and restart the elasticsearch. when I create a new  
> river, it cat not started.  
> There are some error message in the elasticsearch.log.
> 
> [2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf]  
> [jdbc][my\_jdbc\_river] starting JDBC connector: URL  
> [jdbc:mysql://192.168.1.100:3306/forum], driver [com.mysql.jdbc.Driver], sql  
> [select "index" as "\_index", id as "\_id",topic.\* from topic where  
> group\_topic\_type=0 and hidden=0 and active=1], river table [false], indexing  
> to [jdbc]/[jdbc], poll [1m]  
> [2012-07-19 11:10:34,585][ERROR][river.jdbc]  
> com.mysql.jdbc.Driver  
> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> at java.lang.Class.forName0(Native Method)  
> at java.lang.Class.forName(Class.java:186)  
> at  
> org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)  
> at  
> org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)  
> at java.lang.Thread.run(Thread.java:722)
> 
> I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the same  
> situation.
> 
> what is missing for it? how can I to do?
> 
> Thanks,  
> Arthur
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
David Pilato  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 20, 2012, 3:24pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/3 "2012-07-20T15:24:07Z")

</div>

Thanks David for clarifying,

yes, to cope with various licensing issues, I deeply regret that I decided  
to omit JDBC drivers from the river plugin.

Best regard,

Jörg

---

<div class="post-metadata">

**Author:** ![Arthur\_Pan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Arthur\_Pan](https://discuss.elastic.co/u/Arthur_Pan)\
**Post date:** [July 20, 2012, 5:57pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/4 "2012-07-20T17:57:09Z")

</div>

Thanks David and Jörg.

At first, please excuse my poor English.

I want develop a search function for my company's web and it use php.

Can show me how to add it in the plugin.xml? because, I never learned Java.  
So, I don't know how to add it.  
Then, how about the next step? do I open the JDBC river's source with some  
software to compile it?

Thanks for your help.  
Arthur

David Pilato於 2012年7月20日星期五UTC+8下午4時30分43秒寫道：

> As far as I understand the plugin.xml file, the JDBC river does not  
> provide the JDBC driver for all vendors and all versions !
> 
> So, I think you have to add your MySQL driver jar in the elasticsearch  
> classpath before launching the node.
> 
> HTH
> 
> David.
> 
> Le 19 juillet 2012 à 06:17, arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :
> 
> > Hi,  
> > I installed JDBC River and restart the elasticsearch. when I create a  
> > new  
> > river, it cat not started.  
> > There are some error message in the elasticsearch.log.
> > 
> > [2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf]  
> > [jdbc][my\_jdbc\_river] starting JDBC connector: URL  
> > [jdbc:mysql://192.168.1.100:3306/forum], driver  
> > [com.mysql.jdbc.Driver], sql  
> > [select "index" as "\_index", id as "\_id",topic.\* from topic where  
> > group\_topic\_type=0 and hidden=0 and active=1], river table [false],  
> > indexing  
> > to [jdbc]/[jdbc], poll [1m]  
> > [2012-07-19 11:10:34,585][ERROR][river.jdbc]  
> > com.mysql.jdbc.Driver  
> > java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> > at java.security.AccessController.doPrivileged(Native Method)  
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> > at java.lang.Class.forName0(Native Method)  
> > at java.lang.Class.forName(Class.java:186)  
> > at
> 
> org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)
> 
> > ```
> > at 
> > 
> > ```
> 
> org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)
> 
> > ```
> > at java.lang.Thread.run(Thread.java:722) 
> > 
> > ```
> > 
> > I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the  
> > same  
> > situation.
> > 
> > what is missing for it? how can I to do?
> > 
> > Thanks,  
> > Arthur
> > 
> > --  
> > View this message in context:  
> > [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html)  
> > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2012, 6:23pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/5 "2012-07-20T18:23:36Z")

</div>

Just download the driver :  
[http://www.mysql.fr/get/Downloads/Connector-J/mysql-connector-java-5.1.21.zip/from/http://cdn.mysql.com/](http://www.mysql.fr/get/Downloads/Connector-J/mysql-connector-java-5.1.21.zip/from/http://cdn.mysql.com/)

Unzip it and put the jar file in the Elasticsearch lib dir (as far as I remember, there's a lib dir)

Restart your node.

That's all.

HTH  
David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 20 juil. 2012 à 19:57, Arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :

> Thanks David and Jörg.
> 
> At first, please excuse my poor English.
> 
> I want develop a search function for my company's web and it use php.
> 
> Can show me how to add it in the plugin.xml? because, I never learned Java. So, I don't know how to add it.  
> Then, how about the next step? do I open the JDBC river's source with some software to compile it?
> 
> Thanks for your help.  
> Arthur
> 
> David Pilato於 2012年7月20日星期五UTC+8下午4時30分43秒寫道：  
> As far as I understand the plugin.xml file, the JDBC river does not provide the JDBC driver for all vendors and all versions !  
> So, I think you have to add your MySQL driver jar in the elasticsearch classpath before launching the node.
> 
> HTH  
> David.
> 
> Le 19 juillet 2012 à 06:17, arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :
> 
> > Hi,  
> > I installed JDBC River and restart the elasticsearch. when I create a new  
> > river, it cat not started.  
> > There are some error message in the elasticsearch.log.
> > 
> > [2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf]  
> > [jdbc][my\_jdbc\_river] starting JDBC connector: URL  
> > [jdbc:mysql://192.168.1.100:3306/forum], driver [com.mysql.jdbc.Driver], sql  
> > [select "index" as "\_index", id as "\_id",topic.\* from topic where  
> > group\_topic\_type=0 and hidden=0 and active=1], river table [false], indexing  
> > to [jdbc]/[jdbc], poll [1m]  
> > [2012-07-19 11:10:34,585][ERROR][river.jdbc]  
> > com.mysql.jdbc.Driver  
> > java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> > at java.security.AccessController.doPrivileged(Native Method)  
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> > at java.lang.Class.forName0(Native Method)  
> > at java.lang.Class.forName(Class.java:186)  
> > at  
> > org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)  
> > at  
> > org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)  
> > at java.lang.Thread.run(Thread.java:722)
> > 
> > I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the same  
> > situation.
> > 
> > what is missing for it? how can I to do?
> > 
> > Thanks,  
> > Arthur
> > 
> > --  
> > View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html)  
> > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Arthur\_Pan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Arthur\_Pan](https://discuss.elastic.co/u/Arthur_Pan)\
**Post date:** [July 23, 2012, 4:24am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/6 "2012-07-23T04:24:50Z")

</div>

Thanks David's answer!!

I copied the jar file in the Elasticsearhc lib dir and restarted it, but It  
is have another situation.

I created a new river.

curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "com.mysql.jdbc.Driver",  
"url" : "jdbc:mysql://172.16.1.169:3306/Forum\_dbo",  
"user" : "forum",  
"password" : "12345",  
"sql" : "select \* from Cate3"  
}  
}'

It is return this value:  
{"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":1}

but river is not working.  
I view the Elasticsearch log file and found some message.

[2012-07-23 11:17:14,372][WARN][river] [Aardwolf]  
failed to create river [jdbc][my\_jdbc\_river]  
org.elasticsearch.common.settings.NoClassSettingsException: Failed to load  
class with value [jdbc]  
at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:86)  
at org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:57)  
at  
org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:44)  
at org.elasticsearch.river.RiversService.createRiver(RiversService.java:135)  
at  
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)  
at  
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)  
at  
org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:722)  
Caused by: java.lang.ClassNotFoundException: jdbc  
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:72)  
... 9 more  
[2012-07-23 11:17:14,383][INFO][cluster.metadata] [Aardwolf]  
[\_river] update\_mapping [my\_jdbc\_river] (dynamic)

I checked account's permission of MySQL also then do it again, but it have  
same situation.

what is missing?

Thanks for your help.  
Arthur

David Pilato於 2012年7月21日星期六UTC+8上午2時23分36秒寫道：

> Just download the driver :
> 
> [http://www.mysql.fr/get/Downloads/Connector-J/mysql-connector-java-5.1.21.zip/from/http://cdn.mysql.com/](http://www.mysql.fr/get/Downloads/Connector-J/mysql-connector-java-5.1.21.zip/from/http://cdn.mysql.com/)
> 
> Unzip it and put the jar file in the Elasticsearch lib dir (as far as I  
> remember, there's a lib dir)
> 
> Restart your node.
> 
> That's all.
> 
> HTH  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 20 juil. 2012 à 19:57, Arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :
> 
> Thanks David and Jörg.
> 
> At first, please excuse my poor English.
> 
> I want develop a search function for my company's web and it use php.
> 
> Can show me how to add it in the plugin.xml? because, I never learned  
> Java. So, I don't know how to add it.  
> Then, how about the next step? do I open the JDBC river's source with  
> some software to compile it?
> 
> Thanks for your help.  
> Arthur
> 
> David Pilato於 2012年7月20日星期五UTC+8下午4時30分43秒寫道：
> 
> > As far as I understand the plugin.xml file, the JDBC river does not  
> > provide the JDBC driver for all vendors and all versions !
> > 
> > So, I think you have to add your MySQL driver jar in the elasticsearch  
> > classpath before launching the node.
> > 
> > HTH
> > 
> > David.
> > 
> > Le 19 juillet 2012 à 06:17, arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :
> > 
> > > Hi,  
> > > I installed JDBC River and restart the elasticsearch. when I create a  
> > > new  
> > > river, it cat not started.  
> > > There are some error message in the elasticsearch.log.
> > > 
> > > [2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf]  
> > > [jdbc][my\_jdbc\_river] starting JDBC connector: URL  
> > > [jdbc:mysql://192.168.1.100:3306/forum], driver  
> > > [com.mysql.jdbc.Driver], sql  
> > > [select "index" as "\_index", id as "\_id",topic.\* from topic where  
> > > group\_topic\_type=0 and hidden=0 and active=1], river table [false],  
> > > indexing  
> > > to [jdbc]/[jdbc], poll [1m]  
> > > [2012-07-19 11:10:34,585][ERROR][river.jdbc]  
> > > com.mysql.jdbc.Driver  
> > > java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> > > at java.security.AccessController.doPrivileged(Native Method)  
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> > > at  
> > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> > > at java.lang.Class.forName0(Native Method)  
> > > at java.lang.Class.forName(Class.java:186)  
> > > at
> > 
> > org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)
> > 
> > > ```
> > > at 
> > > 
> > > ```
> > 
> > org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)
> > 
> > > ```
> > > at java.lang.Thread.run(Thread.java:722) 
> > > 
> > > ```
> > > 
> > > I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the  
> > > same  
> > > situation.
> > > 
> > > what is missing for it? how can I to do?
> > > 
> > > Thanks,  
> > > Arthur
> > > 
> > > --  
> > > View this message in context:  
> > > [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html)  
> > > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > 
> > --  
> > David Pilato  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 23, 2012, 5:19am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/7 "2012-07-23T05:19:14Z")

</div>

Try to delete \_river index and start it again.

> curl -XDELETE 'localhost:9200/\_river

Not sure it will help.

## David

Le 23 juil. 2012 à 06:24, Arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :

> Thanks David's answer!!
> 
> I copied the jar file in the Elasticsearhc lib dir and restarted it, but It is have another situation.
> 
> I created a new river.
> 
> curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
> "type" : "jdbc",  
> "jdbc" : {  
> "driver" : "com.mysql.jdbc.Driver",  
> "url" : "jdbc:mysql://172.16.1.169:3306/Forum\_dbo",  
> "user" : "forum",  
> "password" : "12345",  
> "sql" : "select \* from Cate3"  
> }  
> }'
> 
> It is return this value:  
> {"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":1}
> 
> but river is not working.  
> I view the Elasticsearch log file and found some message.
> 
> [2012-07-23 11:17:14,372][WARN][river] [Aardwolf] failed to create river [jdbc][my\_jdbc\_river]  
> org.elasticsearch.common.settings.NoClassSettingsException: Failed to load class with value [jdbc]  
> at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:86)  
> at org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:57)  
> at org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:44)  
> at org.elasticsearch.river.RiversService.createRiver(RiversService.java:135)  
> at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)  
> at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)  
> at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)  
> Caused by: java.lang.ClassNotFoundException: jdbc  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:72)  
> ... 9 more  
> [2012-07-23 11:17:14,383][INFO][cluster.metadata] [Aardwolf] [\_river] update\_mapping [my\_jdbc\_river] (dynamic)
> 
> I checked account's permission of MySQL also then do it again, but it have same situation.
> 
> what is missing?
> 
> Thanks for your help.  
> Arthur
> 
> David Pilato於 2012年7月21日星期六UTC+8上午2時23分36秒寫道：  
> Just download the driver :  
> [http://www.mysql.fr/get/Downloads/Connector-J/mysql-connector-java-5.1.21.zip/from/http://cdn.mysql.com/](http://www.mysql.fr/get/Downloads/Connector-J/mysql-connector-java-5.1.21.zip/from/http://cdn.mysql.com/)
> 
> Unzip it and put the jar file in the Elasticsearch lib dir (as far as I remember, there's a lib dir)
> 
> Restart your node.
> 
> That's all.
> 
> HTH  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 20 juil. 2012 à 19:57, Arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :
> 
> > Thanks David and Jörg.
> > 
> > At first, please excuse my poor English.
> > 
> > I want develop a search function for my company's web and it use php.
> > 
> > Can show me how to add it in the plugin.xml? because, I never learned Java. So, I don't know how to add it.  
> > Then, how about the next step? do I open the JDBC river's source with some software to compile it?
> > 
> > Thanks for your help.  
> > Arthur
> > 
> > David Pilato於 2012年7月20日星期五UTC+8下午4時30分43秒寫道：  
> > As far as I understand the plugin.xml file, the JDBC river does not provide the JDBC driver for all vendors and all versions !  
> > So, I think you have to add your MySQL driver jar in the elasticsearch classpath before launching the node.
> > 
> > HTH  
> > David.
> > 
> > Le 19 juillet 2012 à 06:17, arthur pan [jtp0102@gmail.com](mailto:jtp0102@gmail.com) a écrit :
> > 
> > > Hi,  
> > > I installed JDBC River and restart the elasticsearch. when I create a new  
> > > river, it cat not started.  
> > > There are some error message in the elasticsearch.log.
> > > 
> > > [2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf]  
> > > [jdbc][my\_jdbc\_river] starting JDBC connector: URL  
> > > [jdbc:mysql://192.168.1.100:3306/forum], driver [com.mysql.jdbc.Driver], sql  
> > > [select "index" as "\_index", id as "\_id",topic.\* from topic where  
> > > group\_topic\_type=0 and hidden=0 and active=1], river table [false], indexing  
> > > to [jdbc]/[jdbc], poll [1m]  
> > > [2012-07-19 11:10:34,585][ERROR][river.jdbc]  
> > > com.mysql.jdbc.Driver  
> > > java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> > > at java.security.AccessController.doPrivileged(Native Method)  
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> > > at java.lang.Class.forName0(Native Method)  
> > > at java.lang.Class.forName(Class.java:186)  
> > > at  
> > > org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)  
> > > at  
> > > org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)  
> > > at java.lang.Thread.run(Thread.java:722)
> > > 
> > > I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the same  
> > > situation.
> > > 
> > > what is missing for it? how can I to do?
> > > 
> > > Thanks,  
> > > Arthur
> > > 
> > > --  
> > > View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html)  
> > > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > 
> > --  
> > David Pilato  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Arthur\_Pan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Arthur\_Pan](https://discuss.elastic.co/u/Arthur_Pan)\
**Post date:** [July 23, 2012, 8:57am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/8 "2012-07-23T08:57:42Z")

</div>

Hi,  
River is running success.

After that, I remove all index, but it still not work.  
I searched and found some article that about how to install MySQL's JDBC  
driver, and I found that my server not installed mysql's JDBC driver.  
So, I decide to try it.

excute "sudo apt-get install libmysql-java" to install mysql's JDBC driver  
then add path in the /etc/profile file.

copy /usr/share/java/mysql-connector-java-5.1.10.jar in to  
Elasticsearch\_root\_dir/lib/ and restart Elasticsearch.

Create a new river.  
curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "com.mysql.jdbc.Driver",  
"url" : "jdbc:mysql://172.16.1.100:3306/forum",  
"user" : "abc",  
"password" : "12345",  
"sql" : "select \* from Cate3"  
}  
}'

It is working. 🙂

Arthur pan於 2012年7月19日星期四UTC+8下午12時17分51秒寫道：

> Hi,  
> I installed JDBC River and restart the elasticsearch. when I create a new  
> river, it cat not started.  
> There are some error message in the elasticsearch.log.
> 
> [2012-07-19 11:10:34,390][INFO][river.jdbc] [Aardwolf]  
> [jdbc][my\_jdbc\_river] starting JDBC connector: URL  
> [jdbc:mysql://192.168.1.100:3306/forum], driver [com.mysql.jdbc.Driver],  
> sql  
> [select "index" as "\_index", id as "\_id",topic.\* from topic where  
> group\_topic\_type=0 and hidden=0 and active=1], river table [false],  
> indexing  
> to [jdbc]/[jdbc], poll [1m]  
> [2012-07-19 11:10:34,585][ERROR][river.jdbc]  
> com.mysql.jdbc.Driver  
> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)  
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
> at java.lang.Class.forName0(Native Method)  
> at java.lang.Class.forName(Class.java:186)  
> at  
> org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:102)  
> at  
> org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)
> 
> ```
> at java.lang.Thread.run(Thread.java:722) 
> 
> ```
> 
> I try it both "Ubuntu 11.10" and "mac lion 10.7.4", but it is in the same  
> situation.
> 
> what is missing for it? how can I to do?
> 
> Thanks,  
> Arthur
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![alex1](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alex1](https://discuss.elastic.co/u/alex1)\
**Post date:** [July 27, 2012, 3:21pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/9 "2012-07-27T15:21:55Z")

</div>

Good afternoon to everybody,

Recently I have installed elasticsearch and the JDBC River, and seem to be working fine, even if I am quite new to the no-sql technologies and as novice am I, it could sound a bit silly my question.

When I try to see the status of my ‘river’:to retrieve the status with

[http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)

This is displayed as a result:  
{  
"\_index" : "\_river",  
"\_type" : "my\_jdbc\_river",  
"\_id" : "\_status",  
"\_version" : 1,  
"exists" : true, "\_source" : {"ok":true,"node":{"id":"hm-baF0PSOG57bQuhn6sMw","name":"Supernalia","transport\_address":"inet[/217.169.9.63:9303]"}}  
}

Taking the example of MySql, then if I would execute a Sql query to retrieve info like:

SELECT \* FROM test.orders;

The results could be:

dustomer, department, product, quantity, created  
'Big', 'American Fruits', 'Apples', '1', '0000-00-00 00:00:00'  
'Large', 'German Fruits', 'Bananas', '1', '0000-00-00 00:00:00'  
'Huge', 'German Fruits', 'Oranges', '2', '0000-00-00 00:00:00'  
'Good', 'German Fruits', 'Apples', '2', '2012-06-01 00:00:00'  
'Bad', 'English Fruits', 'Oranges', '3', '2012-06-01 00:00:00'

The **question** then is **how could I get similar results using elasticsearch**?

Thanks.

---

<div class="post-metadata">

**Author:** ![alex1](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alex1](https://discuss.elastic.co/u/alex1)\
**Post date:** [July 27, 2012, 4:03pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/10 "2012-07-27T16:03:47Z")

</div>

Good afternoon to everybody,

Recently I have installed elasticsearch and the JDBC River, and seem to be working fine, even if I am quite new to the no-sql technologies and as novice am I, it could sound a bit silly my question.

When I try to see the status of my ‘river’:to retrieve the status with

[http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)

This is displayed as a result:  
{  
"\_index" : "\_river",  
"\_type" : "my\_jdbc\_river",  
"\_id" : "\_status",  
"\_version" : 1,  
"exists" : true, "\_source" : {"ok":true,"node":{"id":"hm-baF0PSOG57bQuhn6sMw","name":"Supernalia","transport\_address":"inet[/217.169.9.63:9303]"}}  
}

Taking the example of MySql, then if I would execute a Sql query to retrieve info like:

SELECT \* FROM test.orders;

The results could be:

dustomer, department, product, quantity, created  
'Big', 'American Fruits', 'Apples', '1', '0000-00-00 00:00:00'  
'Large', 'German Fruits', 'Bananas', '1', '0000-00-00 00:00:00'  
'Huge', 'German Fruits', 'Oranges', '2', '0000-00-00 00:00:00'  
'Good', 'German Fruits', 'Apples', '2', '2012-06-01 00:00:00'  
'Bad', 'English Fruits', 'Oranges', '3', '2012-06-01 00:00:00'

The **question** then is **how could I get similar results using elasticsearch?**

Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 27, 2012, 4:24pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/11 "2012-07-27T16:24:04Z")

</div>

Something like

curl -XGET [http://localhost:9200/my\_jdbc\_river/orders/\_search?q=](http://localhost:9200/my_jdbc_river/orders/_search?q=)\*

?

HTH  
david.

Le 27 juillet 2012 à 18:03, alex [alejandro@themartingale.com](mailto:alejandro@themartingale.com) a écrit :

> Good afternoon to everybody,
> 
> Recently I have installed elasticsearch and the JDBC River, and seem to be  
> working fine, even if I am quite new to the no-sql technologies and as  
> novice am I, it could sound a bit silly my question.
> 
> When I try to see the status of my ‘river’:to retrieve the status with
> 
> [http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)
> 
> This is displayed as a result:  
> {  
> "\_index" : "\_river",  
> "\_type" : "my\_jdbc\_river",  
> "\_id" : "\_status",  
> "\_version" : 1,  
> "exists" : true, "\_source" :  
> {"ok":true,"node":{"id":"hm-baF0PSOG57bQuhn6sMw","name":"Supernalia","transport\_address":"inet[/217.169.9.63:9303]"}}  
> }
> 
> Taking the example of MySql, then if I would execute a Sql query to retrieve  
> info like:
> 
> SELECT \* FROM test.orders;
> 
> The results could be:
> 
> dustomer, department, product, quantity, created  
> 'Big', 'American Fruits', 'Apples', '1', '0000-00-00 00:00:00'  
> 'Large', 'German Fruits', 'Bananas', '1', '0000-00-00 00:00:00'  
> 'Huge', 'German Fruits', 'Oranges', '2', '0000-00-00 00:00:00'  
> 'Good', 'German Fruits', 'Apples', '2', '2012-06-01 00:00:00'  
> 'Bad', 'English Fruits', 'Oranges', '3', '2012-06-01 00:00:00'
> 
> The _question_ then is \*how could I get similar results using elasticsearch?  
> \*
> 
> Thanks.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4020922.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4020922.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

---

<div class="post-metadata">

**Author:** ![alex1](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alex1](https://discuss.elastic.co/u/alex1)\
**Post date:** [July 30, 2012, 11:05am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/12 "2012-07-30T11:05:48Z")

</div>

Good morning dadoonet,

```
 Thanks for your soon reply. As you had suggested me, I have tried:

```

_curl -XGET [http://localhost:9200/my\_jdbc\_river/orders/\_search?q=\*](http://localhost:9200/my_jdbc_river/orders/_search?q=*)_

but then I get the result:

**{"error":"IndexMissingException[[my\_jdbc\_river] missing]","status":404}**

Also I have tried:

_curl -XGET [http://localhost:9200/\_river/my\_jdbc\_river/orders/\_search?q=\*](http://localhost:9200/_river/my_jdbc_river/orders/_search?q=*)_

and get the result:

**No handler found for uri [/\_river/my\_jdbc\_river/orders/\_search?q=\*] and method [GET]**

And also tried:

_[http://dev-vm-03:9200/jdbc/orders/\_search?q=\*](http://dev-vm-03:9200/jdbc/orders/_search?q=*)_

Results:

**{"took":473,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}**

It seems that the info is there (total: 5 – for the 5 rows I think). The point is that if there is this request structure:

[http://localhost:9200/{index}/{type}/{id}](http://localhost:9200/%7Bindex%7D/%7Btype%7D/%7Bid%7D)

And the River-JDBC follow:

Index: jdbc/jdbc [as it is said in: [https://github.com/jprante/elasticsearch-river-jdbc](https://github.com/jprante/elasticsearch-river-jdbc)] it should work like you said it before, but still I can Not retrieve the list of orders like:

dustomer, department, product, quantity, created  
'Big', 'American Fruits', 'Apples', '1', '0000-00-00 00:00:00'  
'Large', 'German Fruits', 'Bananas', '1', '0000-00-00 00:00:00'  
'Huge', 'German Fruits', 'Oranges', '2', '0000-00-00 00:00:00'  
'Good', 'German Fruits', 'Apples', '2', '2012-06-01 00:00:00'  
'Bad', 'English Fruits', 'Oranges', '3', '2012-06-01 00:00:00'

Even if I created the index like this:

curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "com.mysql.jdbc.Driver",  
"url" : "jdbc:mysql://database:3306/test",  
"user" : "root",  
"password" : "",  
"sql" : "select \* from orders;"  
}  
}'

It is quite frustrating and a bit confusing this, even if it is just a ‘select basic query’, and there is Not even one example of “getting” info in the [https://github.com/jprante/elasticsearch-river-jdbc](https://github.com/jprante/elasticsearch-river-jdbc) main documentation, or at least I didn’t find any yet.

This could be very easy and fast, but after many hours trying to understand and make it work properly I still didn’t get the basic results I need. Any idea or suggestion is more than welcome and very useful. Thanks in advance.

P.D.: The objective after achieving this is to create a Joomla component which could “search” the entire site and MySql database.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 30, 2012, 1:19pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/13 "2012-07-30T13:19:24Z")

</div>

Try with :

curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=](http://localhost:9200/jdbc/jdbc/_search?q=)\*

or

curl -XGET [http://localhost:9200/\_search?q=](http://localhost:9200/_search?q=)\*

The last one will give you all indexed documents in ES (also the jdbc river  
settings).  
But, you should find at least one of your "orders".

> _{"took":473,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}_
> 
> It seems that the info is there (total: 5 – for the 5 rows I think).  
> No. An index is broken in 5 shards by default. This answer only means that ES  
> has successfuly searched in the 5 shards.

hits.total=0, that's the number of documents ES have found.

HTH  
David.

Le 30 juillet 2012 à 13:05, alex [alejandro@themartingale.com](mailto:alejandro@themartingale.com) a écrit :

> Good morning dadoonet,
> 
> ```
> Thanks for your soon reply. As you had suggested me, I have tried:
> 
> ```
> 
> /curl -XGET [http://localhost:9200/my\_jdbc\_river/orders/\_search?q=\*/](http://localhost:9200/my_jdbc_river/orders/_search?q=*/)
> 
> but then I get the result:
> 
> _{"error":"IndexMissingException[[my\_jdbc\_river] missing]","status":404}_
> 
> Also I have tried:
> 
> /curl -XGET [http://localhost:9200/\_river/my\_jdbc\_river/orders/\_search?q=\*/](http://localhost:9200/_river/my_jdbc_river/orders/_search?q=*/)
> 
> and get the result:
> 
> _No handler found for uri [/\_river/my\_jdbc\_river/orders/\_search?q=_] and  
> method [GET]\*
> 
> And also tried:
> 
> /[http://dev-vm-03:9200/jdbc/orders/\_search?q=\*/](http://dev-vm-03:9200/jdbc/orders/_search?q=*/)
> 
> Results:
> 
> _{"took":473,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}_
> 
> It seems that the info is there (total: 5 – for the 5 rows I think). The  
> point is that if there is this request structure:
> 
> [http://localhost:9200/{index}/{type}/{id}](http://localhost:9200/%7Bindex%7D/%7Btype%7D/%7Bid%7D)
> 
> And the River-JDBC follow:
> 
> Index: jdbc/jdbc [as it is said in:  
> [GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-river-jdbc)] it should work like you  
> said it before, but still I can Not retrieve the list of orders like:
> 
> dustomer, department, product, quantity, created  
> 'Big', 'American Fruits', 'Apples', '1', '0000-00-00 00:00:00'  
> 'Large', 'German Fruits', 'Bananas', '1', '0000-00-00 00:00:00'  
> 'Huge', 'German Fruits', 'Oranges', '2', '0000-00-00 00:00:00'  
> 'Good', 'German Fruits', 'Apples', '2', '2012-06-01 00:00:00'  
> 'Bad', 'English Fruits', 'Oranges', '3', '2012-06-01 00:00:00'
> 
> Even if I created the index like this:
> 
> curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
> "type" : "jdbc",  
> "jdbc" : {  
> "driver" : "com.mysql.jdbc.Driver",  
> "url" : "jdbc:mysql://database:3306/test",  
> "user" : "root",  
> "password" : "",  
> "sql" : "select \* from orders;"  
> }  
> }'
> 
> It is quite frustrating and a bit confusing this, even if it is just a  
> ‘select basic query’, and there is Not even one example of “getting” info in  
> the [GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-river-jdbc) main documentation,  
> or at least I didn’t find any yet.
> 
> This could be very easy and fast, but after many hours trying to understand  
> and make it work properly I still didn’t get the basic results I need. Any  
> idea or suggestion is more than welcome and very useful. Thanks in advance.
> 
> P.D.: The objective after achieving this is to create a Joomla component  
> which could “search” the entire site and MySql database.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021009.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021009.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

---

<div class="post-metadata">

**Author:** ![alex1](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alex1](https://discuss.elastic.co/u/alex1)\
**Post date:** [July 30, 2012, 4:42pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/14 "2012-07-30T16:42:24Z")

</div>

**Thanks very much David!!** It is working fine now!!

```
 I had executed this suggested command:

```

_curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*](http://localhost:9200/jdbc/jdbc/_search?q=*)_

And then it was displayed and clear that the index was there but still empty, then fixed my login info to MySql, deleted the former Index, created a new one and after executing the other command:

_curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*&pretty=true](http://localhost:9200/jdbc/jdbc/_search?q=*&pretty=true)_

```
I could effectively get the complete list of ‘orders’ <b>result</b> like this:

```

{  
"took" : 2627,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 5,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "jdbc",  
"\_type" : "jdbc",  
"\_id" : "4",  
"\_score" : 1.0, "\_source" : {"product":"Apples","created":"2012-05-31T23:00:00Z","department":"German Fruits","quantity":2,"customer":"Good"}  
}, {  
"\_index" : "jdbc",  
"\_type" : "jdbc",  
"\_id" : "5",  
"\_score" : 1.0, "\_source" : {"product":"Oranges","created":"2012-05-31T23:00:00Z","department":"English Fruits","quantity":3,"customer":"Bad"}  
}, {  
"\_index" : "jdbc",  
"\_type" : "jdbc",  
"\_id" : "1",  
"\_score" : 1.0, "\_source" : {"product":"Apples","created":null,"department":"American Fruits","quantity":1,"customer":"Big"}  
}, {  
"\_index" : "jdbc",  
"\_type" : "jdbc",  
"\_id" : "2",  
"\_score" : 1.0, "\_source" : {"product":"Bananas","created":null,"department":"German Fruits","quantity":1,"customer":"Large"}  
}, {  
"\_index" : "jdbc",  
"\_type" : "jdbc",  
"\_id" : "3",  
"\_score" : 1.0, "\_source" : {"product":"Oranges","created":null,"department":"German Fruits","quantity":2,"customer":"Huge"}  
} ]  
}  
}

**Note:** Also probably we had this strange magic behavior as we were working like a team, with another colleague and someway her IP address appears in the Log file, and mine in her Log file, and any change she was making [at the same Server but in a different Virtual Machine with different IP] was affecting me and my changes affecting her.

Then she stooped everything, deleted everything (I still could see some of her ‘remaining nodes’ somehow) and I tried to do it again everything from the beginning. Ok it was not the standard environment to install and test it, I know but I am happy that it is working well now.

Thanks, now I know that the problem was the concurrent work, the Data Base connection and the structure of retrieving info.

Alex

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 30, 2012, 5:53pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/15 "2012-07-30T17:53:56Z")

</div>

Magic? No! Only Elastic! 😉

Each Time you launch a new node in your network, ES find all other nodes of your cluster.  
To change it, simply change your cluster name in elasticsearch.yml file.

David

--

Le 30 juil. 2012 à 18:42, alex [alejandro@themartingale.com](mailto:alejandro@themartingale.com) a écrit :

> _Thanks very much David!!_ It is working fine now!!
> 
> ```
> I had executed this suggested command:
> 
> ```
> 
> /curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*/](http://localhost:9200/jdbc/jdbc/_search?q=*/)
> 
> And then it was displayed and clear that the index was there but still  
> empty, then fixed my login info to MySql, deleted the former Index, created  
> a new one and after executing the other command:
> 
> /curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*&pretty=true/](http://localhost:9200/jdbc/jdbc/_search?q=*&pretty=true/)
> 
> I could effectively get the complete list of ‘orders’ _result_ like  
> this:
> 
> {  
> "took" : 2627,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 5,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "4",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Apples","created":"2012-05-31T23:00:00Z","department":"German  
> Fruits","quantity":2,"customer":"Good"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "5",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Oranges","created":"2012-05-31T23:00:00Z","department":"English  
> Fruits","quantity":3,"customer":"Bad"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "1",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Apples","created":null,"department":"American  
> Fruits","quantity":1,"customer":"Big"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "2",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Bananas","created":null,"department":"German  
> Fruits","quantity":1,"customer":"Large"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "3",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Oranges","created":null,"department":"German  
> Fruits","quantity":2,"customer":"Huge"}  
> } ]  
> }  
> }
> 
> _Note:_ Also probably we had this strange magic behavior as we were working  
> like a team, with another colleague and someway her IP address appears in  
> the Log file, and mine in her Log file, and any change she was making [at  
> the same Server but in a different Virtual Machine with different IP] was  
> affecting me and my changes affecting her.
> 
> Then she stooped everything, deleted everything (I still could see some of  
> her ‘remaining nodes’ somehow) and I tried to do it again everything from  
> the beginning. Ok it was not the standard environment to install and test  
> it, I know but I am happy that it is working well now.
> 
> Thanks, now I know that the problem was the concurrent work, the Data Base  
> connection and the structure of retrieving info.
> 
> Alex
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021024.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021024.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 30, 2012, 5:56pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/16 "2012-07-30T17:56:44Z")

</div>

Hi Alex,

thanks for trying the JDBC river, it is my personal project, please don't  
blame Elasticsearch for that.

I will take it very seriously that full out-of-the-box working examples are  
missing and quick start seems not easy, so I will add a tutorial "Getting  
started" with detailed steps to the wiki of the JDBC river github project  
soon.

David, thanks for giving advise to Alex! Much appreciated!

Best regards,

Jörg

On Monday, July 30, 2012 6:42:25 PM UTC+2, alex wrote:

> _Thanks very much David!!_ It is working fine now!!
> 
> ```
> I had executed this suggested command: 
> 
> ```
> 
> /curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*/](http://localhost:9200/jdbc/jdbc/_search?q=*/)
> 
> And then it was displayed and clear that the index was there but still  
> empty, then fixed my login info to MySql, deleted the former Index,  
> created  
> a new one and after executing the other command:
> 
> /curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*&pretty=true/](http://localhost:9200/jdbc/jdbc/_search?q=*&pretty=true/)
> 
> ```
> I could effectively get the complete list of ‘orders’ *result* like 
> 
> ```
> 
> this:
> 
> {  
> "took" : 2627,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 5,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "4",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Apples","created":"2012-05-31T23:00:00Z","department":"German  
> Fruits","quantity":2,"customer":"Good"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "5",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Oranges","created":"2012-05-31T23:00:00Z","department":"English
> 
> Fruits","quantity":3,"customer":"Bad"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "1",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Apples","created":null,"department":"American  
> Fruits","quantity":1,"customer":"Big"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "2",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Bananas","created":null,"department":"German  
> Fruits","quantity":1,"customer":"Large"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "3",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Oranges","created":null,"department":"German  
> Fruits","quantity":2,"customer":"Huge"}  
> } ]  
> }  
> }
> 
> _Note:_ Also probably we had this strange magic behavior as we were  
> working  
> like a team, with another colleague and someway her IP address appears in  
> the Log file, and mine in her Log file, and any change she was making [at  
> the same Server but in a different Virtual Machine with different IP] was  
> affecting me and my changes affecting her.
> 
> Then she stooped everything, deleted everything (I still could see some of  
> her ‘remaining nodes’ somehow) and I tried to do it again everything from  
> the beginning. Ok it was not the standard environment to install and test  
> it, I know but I am happy that it is working well now.
> 
> Thanks, now I know that the problem was the concurrent work, the Data Base  
> connection and the structure of retrieving info.
> 
> Alex
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021024.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021024.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 30, 2012, 6:04pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/17 "2012-07-30T18:04:38Z")

</div>

My pleasure. As I told you before, with this very nice plugin, you will have many questions about it. I'm sure we can share the support effort !

At least, I will help you a little on it! 😉

Cheers

--

Le 30 juil. 2012 à 19:56, Jörg Prante [joergprante@gmail.com](mailto:joergprante@gmail.com) a écrit :

> Hi Alex,
> 
> thanks for trying the JDBC river, it is my personal project, please don't blame Elasticsearch for that.
> 
> I will take it very seriously that full out-of-the-box working examples are missing and quick start seems not easy, so I will add a tutorial "Getting started" with detailed steps to the wiki of the JDBC river github project soon.
> 
> David, thanks for giving advise to Alex! Much appreciated!
> 
> Best regards,
> 
> Jörg
> 
> On Monday, July 30, 2012 6:42:25 PM UTC+2, alex wrote:  
> _Thanks very much David!!_ It is working fine now!!
> 
> ```
> I had executed this suggested command: 
> 
> ```
> 
> /curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*/](http://localhost:9200/jdbc/jdbc/_search?q=*/)
> 
> And then it was displayed and clear that the index was there but still  
> empty, then fixed my login info to MySql, deleted the former Index, created  
> a new one and after executing the other command:
> 
> /curl -XGET [http://localhost:9200/jdbc/jdbc/\_search?q=\*&pretty=true/](http://localhost:9200/jdbc/jdbc/_search?q=*&pretty=true/)
> 
> ```
> I could effectively get the complete list of ‘orders’ *result* like 
> 
> ```
> 
> this:
> 
> {  
> "took" : 2627,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 5,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "4",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Apples","created":"2012-05-31T23:00:00Z","department":"German  
> Fruits","quantity":2,"customer":"Good"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "5",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Oranges","created":"2012-05-31T23:00:00Z","department":"English  
> Fruits","quantity":3,"customer":"Bad"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "1",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Apples","created":null,"department":"American  
> Fruits","quantity":1,"customer":"Big"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "2",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Bananas","created":null,"department":"German  
> Fruits","quantity":1,"customer":"Large"}  
> }, {  
> "\_index" : "jdbc",  
> "\_type" : "jdbc",  
> "\_id" : "3",  
> "\_score" : 1.0, "\_source" :  
> {"product":"Oranges","created":null,"department":"German  
> Fruits","quantity":2,"customer":"Huge"}  
> } ]  
> }  
> }
> 
> _Note:_ Also probably we had this strange magic behavior as we were working  
> like a team, with another colleague and someway her IP address appears in  
> the Log file, and mine in her Log file, and any change she was making [at  
> the same Server but in a different Virtual Machine with different IP] was  
> affecting me and my changes affecting her.
> 
> Then she stooped everything, deleted everything (I still could see some of  
> her ‘remaining nodes’ somehow) and I tried to do it again everything from  
> the beginning. Ok it was not the standard environment to install and test  
> it, I know but I am happy that it is working well now.
> 
> Thanks, now I know that the problem was the concurrent work, the Data Base  
> connection and the structure of retrieving info.
> 
> Alex
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021024.html](http://elasticsearch-users.115913.n3.nabble.com/JDBC-River-can-not-started-tp4020565p4021024.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![sowmyak](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@sowmyak](https://discuss.elastic.co/u/sowmyak)\
**Post date:** [August 3, 2012, 9:10pm UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/18 "2012-08-03T21:10:47Z")

</div>

Hi,

I have a problem using JDBC plug in with elasticsearch and mysql.  
I am able to poll and retrieve the values using Polling.

But, When I am using the method of Updating Mechanisms, I am not able to index the values into ElasticSearch.

when I am using -XGET to retrieve the indexes, it is giving me 0 hits.

This is the procedure that I have followed for getting my updates on mysql table reflected on elasticsearch index.

Step 1: create table class\_info(rno int, name varchar(100)); //Create a table in mysql database  
Step 2 : create table my\_jdbc\_river(\_index varchar(64), \_type varchar(64), \_id varchar(64), source\_timestamp timestamp not null default current\_timestamp, source\_operation varchar(8), source\_sql varchar(255), target\_timestamp timestamp, target\_operation varchar(8) default 'n/a', target\_failed boolean, target\_message varchar(255), primary key(\_index, \_type, \_id, source\_timestamp, source\_operation));  
//create a river table in mysql database

Step 3: Create a trigger on class\_info table to insert the rows into my\_jdbc\_river on insert operation  
delimiter $$

create trigger check\_root after insert on class\_info for each row begin insert into my\_jdbc\_river values("index", "type", "id", null, 'create', 'select \* from check\_es', null, null, true, null); end$$

delimiter ;

I am not sure whether the parameters to insert statement are correct or not.

Step 4: Create a river on ElasticSearch  
curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{ "type" : "jdbc", "jdbc" : { "driver" : "com.mysql.jdbc.Driver", "url" : "jdbc:mysql://localhost:3306/testes", "user" : "root", "password" : "p00ph34d", "poll" : "300s","rivertable" : true, "interval" : "305s" }, "index" : { "index" : "jdbc","type" : "jdbc", "bulk\_size" : 100,"max\_bulk\_requests" : 30, "bulk\_timeout" : "60s"} }'

And, when i am inserting the values into class\_info they are not being indexed in elasticsearch.

Please let me know the correct procedure I am missing anything or misunderstood the concept.

Thanks!

---

<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, 3:17am UTC](https://discuss.elastic.co/t/jdbc-river-can-not-started/8461/19 "2017-07-06T03:17:46Z")

</div>


