Working on:
SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
logstash 7.8.0
I need to connect to a sybase ASE16, using jconn4 driver.
The driver for example works in squirrel without any problems.
input {
jdbc {
jdbc_driver_library => "/usr/share/logstash/logstash-core/lib/jars/jconn4.jar"
jdbc_driver_class => "com.sybase.jdbc4.jdbc.SybDataSource"
jdbc_connection_string => "jdbc:sybase:Tds:hostname.de:Port?ServiceName=DB"
jdbc_user => "****"
jdbc_password => "*****"
statement => "select * from blub noholdlock where nummer='12334'"
}
}
The error i am getting over and over is:
[ERROR] 2020-07-22 15:37:43.011 [[main]<jdbc] javapipeline - A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"username", jdbc_password=><password>, statement=>"select * from blub noholdlock where nummer='12334314'", jdbc_driver_library=>"/usr/share/logstash/logstash-core/lib/jars/jconn4.jar", jdbc_connection_string=>"jdbc:sybase:Tds:hostname:port?ServiceName=db", id=>"8fc0bcc778a08a28bb8e91cf1c60cb8a8654a8a88f047361669f84a169284086", jdbc_driver_class=>"com.sybase.jdbc4.jdbc.SybDataSource", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_2e86758c-85ac-4e75-8c7a-203783227279", 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=>"/root/.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: Java::JavaSql::SQLException: No suitable driver found for jdbc:sybase:Tds:spam-sun.schlund.de:5000?ServiceName=vertrag
Exception: Sequel::DatabaseConnectionError
Stack: java.sql.DriverManager.getConnection(java/sql/DriverManager.java:702)
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:228)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:566)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:426)
org.jruby.javasupport.JavaMethod.invokeStaticDirect(org/jruby/javasupport/JavaMethod.java:358)
I have read, that i would have to move the driver jar to "/usr/share/logstash/logstash-core/lib/jars/". Before i tried it in a custom folder.
It works neither way.
Can you please help out... this starts getting ridiculous.
KR
Chris