# JDBC Rivertable

**URL:** <https://discuss.elastic.co/t/jdbc-rivertable/9946>\
**Category:** Elasticsearch\
**Created:** [December 5, 2012, 6:13am UTC](https://discuss.elastic.co/t/jdbc-rivertable/9946 "2012-12-05T06:13:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jromeem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jromeem/32/2813_2.png) [@jromeem](https://discuss.elastic.co/u/jromeem)\
**Post date:** [December 5, 2012, 6:13am UTC](https://discuss.elastic.co/t/jdbc-rivertable/9946/1 "2012-12-05T06:13:10Z")

</div>

hello,  
I'm using jprante's elasticsearch-river-jdbc [https://github.com/jprante/elasticsearch-river-jdbc](https://github.com/jprante/elasticsearch-river-jdbc)

I'm setting up a rivertable but it doesnt seem to be working properly...

I created a table in my mysql database using this exactly:  
[https://github.com/jprante/elasticsearch-river-jdbc/blob/master/rivertable.sql](https://github.com/jprante/elasticsearch-river-jdbc/blob/master/rivertable.sql)

I get this error when i set up the jdbc river:

jvm 1 | [2012-12-04 23:56:57,958][INFO][cluster.metadata] [Centennial] [\_river] creating index, cause [auto(index api)], shards [1]/[1], mappings []  
jvm 1 | [2012-12-04 23:56:58,321][INFO][cluster.metadata] [Centennial] [\_river] update\_mapping [my\_jdbc\_river] (dynamic)  
jvm 1 | [2012-12-04 23:56:58,327][INFO][river.jdbc] [Centennial] [jdbc][my\_jdbc\_river] starting JDBC connector: URL [jdbc:mysql://localhost:3306/rivershout\_dev], driver [com.mysql.jdbc.Driver], sql [null], river table [true], indexing to [jdbc]/[jdbc], poll [10s]  
jvm 1 | [2012-12-04 23:56:58,444][INFO][cluster.metadata] [Centennial] [jdbc] creating index, cause [api], shards [5]/[1], mappings []  
jvm 1 | [2012-12-04 23:56:58,967][INFO][river.jdbc] [Centennial] [jdbc][my\_jdbc\_river] create: got 0 rows  
jvm 1 | [2012-12-04 23:56:58,967][ERROR][river.jdbc]  
jvm 1 | java.lang.NullPointerException  
jvm 1 | at org.elasticsearch.river.jdbc.BulkOperation.flush(BulkOperation.java:200)  
jvm 1 | at org.elasticsearch.river.jdbc.JDBCRiver$JDBCRiverTableConnector.run(JDBCRiver.java:312)  
jvm 1 | at java.lang.Thread.run(Thread.java:679)

it seems its trying to process a bulk operation that doesn't exist... maybe because it didn't find any rows (hence create: got 0 rows)? or does this have to do with how i populate the river table in the mysql db?

---

<div class="post-metadata">

**Author:** ![spancer\_ray](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spancer_ray/32/76303_2.png) [@spancer\_ray](https://discuss.elastic.co/u/spancer_ray)\
**Post date:** [December 14, 2012, 1:53am UTC](https://discuss.elastic.co/t/jdbc-rivertable/9946/2 "2012-12-14T01:53:10Z")

</div>

Hi Jromeem,

You have to create a river table exactly the same name with your index name and configure data rows in the river table you created. Once you got data configured, it starts polling..

Thanks,  
Spancer

---

<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:59am UTC](https://discuss.elastic.co/t/jdbc-rivertable/9946/3 "2017-07-06T02:59:50Z")

</div>


