I am trying to index data in elastic search using logstash from SQL server DB and iam getting this following error
Error: undefined method to_sym' for nil:NilClass Did you mean? to_s Exception: NoMethodError Stack: C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/sequel-5.4 ib/sequel/database/connecting.rb:17:in
adapter_class'
C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/se
/database/connecting.rb:36:in connect' C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/se /core.rb:116:in
connect'
C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc
.3/lib/logstash/plugin_mixins/jdbc.rb:112:in block in jdbc_connect' org/jruby/RubyKernel.java:1292:in
loop'
C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc
.3/lib/logstash/plugin_mixins/jdbc.rb:109:in jdbc_connect' C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc .3/lib/logstash/plugin_mixins/jdbc.rb:161:in
open_jdbc_connection'
C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc
.3/lib/logstash/plugin_mixins/jdbc.rb:227:in execute_statement' C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc .3/lib/logstash/inputs/jdbc.rb:271:in
execute_query'
C:/LogTash/logstash-6.1.3/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc
.3/lib/logstash/inputs/jdbc.rb:256:in run' C:/LogTash/logstash-6.1.3/logstash-core/lib/logstash/pipeline.rb:524:in
inp
rker'
C:/LogTash/logstash-6.1.3/logstash-core/lib/logstash/pipeline.rb:517:in `blo
And this is my config file
input {
jdbc
{
jdbc_connection_string=>"*********"
jdbc_user=>"user"
jdbc_password=>"PW"
jdbc_driver_library=>"C:/LogTash/logstash-6.1.3/bin/sqljdbc_6.2/enu/mssql-jdbc-6.2.2.jre8.jar"
jdbc_driver_class=>"com.microsoft.sqlserver.jdbc.SQLServerDriver"
statement=>"use ***** select top 10 * from ****"
}
}
output
{
elasticsearch
{
hosts=>"localhost"
index=>"indexnae"
document_type=>"usermessagesnew"
}
stdout
{}
}
Thanks in advance