Beginners question - error while loading data from SQL to Elasticsearch

Hi,

I am using the following config file to upload a simple table to Elasticsearch:
input {
jdbc {
jdbc_driver_library => "C:/Users/michaeos/Desktop/ELK/logstash-7.6.2/sqljdbc_4.2/enu/jre8/sqljdbc42.jar"
jdbc_connection_string => "jdbc:sqlserver://iibdspdev.inr.rd.hpicorp.net;databaseName=impact21;integratedSecurity=true;”
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_user => "xxx"

statement => "SELECT * FROM Users"

}
}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => "cs_users"
}
}

when I run it I get an exception:
'Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.logging.log4j.core.util.WatchManager.(WatchManager.java:53)
at org.apache.logging.log4j.core.config.AbstractConfiguration.(AbstractConfiguration.java:135)
at org.apache.logging.log4j.core.config.NullConfiguration.(NullConfiguration.java:32)
at org.apache.logging.log4j.core.LoggerContext.(LoggerContext.java:85)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.createContext(ClassLoaderContextSelector.java:179)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:153)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:78)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:65)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:148)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:581)
at org.logstash.Logstash.(Logstash.java:22)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.apache.logging.log4j.core.util.UuidUtil.(UuidUtil.java:81)
... 13 more'

Appreciate any help...

Welcome! :smiley:
Please remember to format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you.

Are you able to post more of the log/exception output?

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