ERROR IN CONNECTING SQL SERVER TO ELASTIC SEARCH

CONF FILE :

input {
jdbc {

jdbc_connection_string => "jdbc:sqlserver://HQTSTW2\SQLEXPRESS;databaseName=sample;integratedSecurity=false;"
jdbc_user => "root"
jdbc_driver_library => "C:/Program Files/sqljdbc_6.2/enu/jre8/sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
statement => "SELECT * FROM country_list"

}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "new_file_sample"
}
}

ERROR MESSAGE :

b:281:in run' C:/Users/MB/Downloads/logstash-7.5.0/logstash-core/lib/logstash/java_pipeline.rb:321:in inputworker'
C:/Users/MB/Downloads/logstash-7.5.0/logstash-core/lib/logstash/java_pipeline.rb:313:in block in start_input' [2020-05-23T14:22:47,697][ERROR][logstash.javapipeline ][main] A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"root", statement=>"SELECT * FROM country_list", jdbc_driver_library=>"C:/Program Files/sqljdbc_6.2/enu/jre8/sqljdbc42.jar", jdbc_connection_string=>"jdbc:sqlserver://HQTSTW2\\SQLEXPRESS;databaseName=sample;integratedSecurity=false;", id=>"a70f8904dbececad3b1f6796f352fc137d8d08a0ab9b9c2023a350c6444d5389", jdbc_driver_class=>"com.microsoft.sqlserver.jdbc.SQLServerDriver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_5f4799a5-484a-4340-85d2-a861a83b36f1", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"C:\\Users\\MB/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true, use_prepared_statements=>false> Error: com.microsoft.sqlserver.jdbc.SQLServerDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library? Exception: LogStash::PluginLoadingError Stack: C:/Users/MB/Downloads/logstash-7.5.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/plugin_mixins/jdbc/jdbc.rb:190:in open_jdbc_connection'
C:/Users/MB/Downloads/logstash-7.5.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/plugin_mixins/jdbc/jdbc.rb:253:in execute_statement' C:/Users/MB/Downloads/logstash-7.5.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/inputs/jdbc.rb:309:in execute_query'
C:/Users/MB/Downloads/logstash-7.5.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/inputs/jdbc.rb:281:in run' C:/Users/MB/Downloads/logstash-7.5.0/logstash-core/lib/logstash/java_pipeline.rb:321:in inputworker'
C:/Users/MB/Downloads/logstash-7.5.0/logstash-core/lib/logstash/java_pipeline.rb:313:in `block in start_inpu

i haven’t really used logstash but this error seems related to the case where logstash is unable to read the driver. I noticed your driver is located in “Program Files”. have you tried escaping the space with \ or put the driver somewhere without a space ?