# Logstash with jdbc mssql-jdbc-6.4.0.jre9 error

**URL:** <https://discuss.elastic.co/t/logstash-with-jdbc-mssql-jdbc-6-4-0-jre9-error/130371>\
**Category:** Logstash\
**Created:** [May 3, 2018, 6:12am UTC](https://discuss.elastic.co/t/logstash-with-jdbc-mssql-jdbc-6-4-0-jre9-error/130371 "2018-05-03T06:12:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sislandtw](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@sislandtw](https://discuss.elastic.co/u/sislandtw)\
**Post date:** [May 3, 2018, 6:12am UTC](https://discuss.elastic.co/t/logstash-with-jdbc-mssql-jdbc-6-4-0-jre9-error/130371/1 "2018-05-03T06:12:52Z")

</div>

need your help  
------------ env --------------------------------------

Logstash connect to MSSQL 2016 DB  
JDBC = \> mssql-jdbc-6.4.0.jre9，  
JRE =\> jre1.8.0\_172  
windows 10  
----------------- config ---------------------------------  
input {  
jdbc {  
jdbc\_driver\_library =\> "D:\elk\logstash-6.2.4\lib\sqlserverdriver\mssql-jdbc-6.4.0.jre9"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
jdbc\_connection\_string =\> "jdbc:sqlserver://SQA2018:1433;databasename=SQA;"  
jdbc\_user =\> "sa"  
jdbc\_password =\> "abc1234567$"  
schedule =\> "\* \* \* \* \*"  
jdbc\_default\_timezone =\> "Asia/Shanghai"  
statement =\> "SELECT \* FROM PRINT\_JOB\_LOG"  
}  
}  
output {  
stdout { codec =\> json\_lines }  
}

--------------- error -----------------------------------  
Sending Logstash's logs to D:/elk/logstash-6.2.4/logs which is now configured via log4j2.properties  
[2018-05-03T13:51:34,841][INFO][logstash.modules.scaffold] Initializing module {:module\_name=\>"fb\_apache", :directory=\>"D:/elk/logstash-6.2.4/modules/fb\_apache/configuration"}  
[2018-05-03T13:51:34,873][INFO][logstash.modules.scaffold] Initializing module {:module\_name=\>"netflow", :directory=\>"D:/elk/logstash-6.2.4/modules/netflow/configuration"}  
[2018-05-03T13:51:35,076][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2018-05-03T13:51:35,623][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.2.4"}  
[2018-05-03T13:51:36,310][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2018-05-03T13:51:38,717][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>4, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
[2018-05-03T13:51:39,170][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x383ffe12 run\>"}  
[2018-05-03T13:51:39,342][INFO][logstash.agent] Pipelines running {:count=\>1, :pipelines=\>["main"]}  
{ 2008 rufus-scheduler intercepted an error:  
2008 job:  
2008 Rufus::Scheduler::CronJob "\* \* \* \* \*" {}  
2008 error:  
2008 2008  
2008 LogStash::ConfigurationError  
2008 com.microsoft.sqlserver.jdbc.SQLServerDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc\_driver\_library?  
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin\_mixins/jdbc.rb:162:in `open_jdbc_connection' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:220:in`execute\_statement'  
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:264:in `execute_query' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:245:in`block in run'  
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:234:in `do_call' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:258:in`do\_trigger'  
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:300:in `block in start_work_thread' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:299:in`block in start\_work\_thread'  
2008 org/jruby/RubyKernel.java:1292:in `loop' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:289:in`block in start\_work\_thread'

* * *

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 3, 2018, 9:05am UTC](https://discuss.elastic.co/t/logstash-with-jdbc-mssql-jdbc-6-4-0-jre9-error/130371/2 "2018-05-03T09:05:06Z")

</div>

Does [Logstash JDBC error java.lang.IllegalStateException](https://discuss.elastic.co/t/logstash-jdbc-error-java-lang-illegalstateexception/128096) help?

---

<div class="post-metadata">

**Author:** ![sislandtw](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@sislandtw](https://discuss.elastic.co/u/sislandtw)\
**Post date:** [May 4, 2018, 1:22am UTC](https://discuss.elastic.co/t/logstash-with-jdbc-mssql-jdbc-6-4-0-jre9-error/130371/3 "2018-05-04T01:22:32Z")

</div>

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:** [June 1, 2018, 1:22am UTC](https://discuss.elastic.co/t/logstash-with-jdbc-mssql-jdbc-6-4-0-jre9-error/130371/4 "2018-06-01T01:22:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
