# How could I build jdbc input plugin?

**URL:** <https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099>\
**Category:** Logstash\
**Created:** [May 21, 2015, 3:03pm UTC](https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099 "2015-05-21T15:03:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ducheol\_Kim](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Ducheol\_Kim](https://discuss.elastic.co/u/Ducheol_Kim)\
**Post date:** [May 21, 2015, 3:03pm UTC](https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099/1 "2015-05-21T15:03:57Z")

</div>

Hi All.

I try to build jdbc plugin which is mentioned below.

> [@Is jdbc river is going to expire? If yes then what is the alternative to connect the database](https://discuss.elastic.co/t/is-jdbc-river-is-going-to-expire-if-yes-then-what-is-the-alternative-to-connect-the-database/497/2):
>
> JDBC river for ES 1.5 and higher will be followed by a standalone JVM solution, a JDBC feeder, which uses transport client, with only small changes to JSON river specification syntax. Existing river versions of JDBC river will be supported until ES versions 1.3 and 1.4 will reach end of updates. I will publish a document how to move to the standalone JDBC feeder so transition will be smooth. If you want to have a glimpse at the upcoming source code, look at the "noriver" branch at [https://gi…](https://github.com/jprante/elasticsearch-jdbc/tree/noriver)

I follow the instruction in the [https://www.elastic.co/guide/en/logstash/current/\_how\_to\_write\_a\_logstash\_input\_plugin.html](https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_input_plugin.html) and I got below error.

$ bundle install  
Updating git://github.com/elasticsearch/logstash.git  
Fetching gem metadata from [https://rubygems.org/](https://rubygems.org/)...........  
Fetching version metadata from [https://rubygems.org/](https://rubygems.org/)...  
Fetching dependency metadata from [https://rubygems.org/](https://rubygems.org/)..  
**Could not find gem 'logstash-devutils (\>= 0) ruby' in any of the gem sources listed in your Gemfile or installed on this machine.**  
$

I google the output and find below.

> <https://stackoverflow.com/questions/29770821/could-not-find-gem-logstash-devutils-0-ruby-in-any-of-the-gem-sources>

I try to install logstash-devutils-0.0.13-java , but I got below message.  
$sudo gem install logstash-devutils-0.0.13-java.gem  
ERROR: Could not find a valid gem 'logstash-devutils-0.0.13-java.gem' (\>= 0) in any repository

So I install jruby, but original problem isn't solved.

Somebody help me how to solve logstash-devutils (\>= 0) dependency problem ?

Thanks

---

<div class="post-metadata">

**Author:** ![karthikbox](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@karthikbox](https://discuss.elastic.co/u/karthikbox)\
**Post date:** [July 13, 2015, 8:33pm UTC](https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099/2 "2015-07-13T20:33:24Z")

</div>

Hi @Ducheol_Kim, have you been able to solve this problem? I have the same issue, please share your solution.

---

<div class="post-metadata">

**Author:** ![Ducheol\_Kim](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Ducheol\_Kim](https://discuss.elastic.co/u/Ducheol_Kim)\
**Post date:** [July 13, 2015, 9:18pm UTC](https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099/3 "2015-07-13T21:18:28Z")

</div>

Hi @karthikbox

I follow below steps and it works for me.  
$ git clone [https://github.com/logstash-plugins/logstash-input-jdbc.git](https://github.com/logstash-plugins/logstash-input-jdbc.git)  
$ cd logstash-input-jdbc  
$ gem build logstash-input-jdbc.gemspec  
$ copy logstash-input-jdbc-0.1.1.gem \<LOGSTASH\_DIR\>  
$ cd \<LOGSTASH\_DIR\>  
$ bin/plugin install logstash-input-jdbc

If you are using this plugin for oracle, you have to put "Java::" prefix at adbc\_driver\_class clause.

> <https://github.com/logstash-plugins/logstash-input-jdbc/issues/8>

In my case, I spend lots of time to prepare compile instance and below was helpful.

> <https://stackoverflow.com/questions/29770821/could-not-find-gem-logstash-devutils-0-ruby-in-any-of-the-gem-sources>

Good luck

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [July 14, 2015, 8:23am UTC](https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099/4 "2015-07-14T08:23:06Z")

</div>

Ducheol\_Kim, can you please post me the working jdbc input configuration?

---

<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, 5:34am UTC](https://discuss.elastic.co/t/how-could-i-build-jdbc-input-plugin/1099/5 "2017-07-06T05:34:49Z")

</div>


