# Logstash Issue

**URL:** <https://discuss.elastic.co/t/logstash-issue/33259>\
**Category:** Logstash\
**Created:** [October 29, 2015, 2:45pm UTC](https://discuss.elastic.co/t/logstash-issue/33259 "2015-10-29T14:45:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoffin](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@Hoffin](https://discuss.elastic.co/u/Hoffin)\
**Post date:** [October 29, 2015, 2:45pm UTC](https://discuss.elastic.co/t/logstash-issue/33259/1 "2015-10-29T14:45:26Z")

</div>

In logstash 2.0 latest version for jdbc input plugin having the issue

The error reported is:  
TypeError: cannot convert instance of class org.jruby.RubyObject to class java.lang.String

Following is my configuration : anything wrong in this.

input {  
jdbc {  
jdbc\_driver\_library =\> "mysql-connector-java-5.1.29.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/schema"  
jdbc\_user =\> "root"  
jdbc\_password =\> "root"  
schedule =\> "0 0/1 \* \* \* ?"  
statement =\> "SELECT \*from table1 "  
type =\> "type1"

```
}
jdbc {
	jdbc_driver_library => "/mysql-connector-java-5.1.29.jar"
		jdbc_driver_class => "com.mysql.jdbc.Driver"
		jdbc_connection_string => "jdbc:mysql://localhost:3306/schema"
		jdbc_user => "root"
		jdbc_password => "root"
		schedule => "0 0/1 * * * ?"
		statement => "SELECT *from table2"
		type => "type2"

}

```

}

output {  
if [type] == "type1" {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "type1"  
}  
}  
if [type] == "type2" {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "type2"  
}  
}  
stdout  
{

}  
}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 30, 2015, 7:31am UTC](https://discuss.elastic.co/t/logstash-issue/33259/2 "2015-10-30T07:31:59Z")

</div>

Check out [Logstash Input JDBC Error - 2.0 - Sql Server](https://discuss.elastic.co/t/logstash-input-jdbc-error-2-0-sql-server/33178/3)

Turns out there was a missed patch when we did 2.0 and if you update the JDC plugin you'll get the fix 🙂

---

<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:24am UTC](https://discuss.elastic.co/t/logstash-issue/33259/3 "2017-07-06T05:24:55Z")

</div>


