Hi There,
We are getting an exception while using logstash-filter-jdbc_static.
We are using postgres db with driver version 42.1.4(as specified in usage in documentation).
However its failing to register because of the following error:
[2019-05-10T13:52:56,296][INFO ][logstash.filters.jdbcstatic] derby.system.home is: /users/Pratyaksh.Kumar
[2019-05-10T13:52:58,453][ERROR][logstash.filters.jdbc.readonlydatabase] Exception occurred when executing loader Jdbc query count {:exception=>"Java::JavaLang::IllegalAccessError: tried to access method org.postgresql.jdbc.PgResultSet.(Lorg/postgresql/core/Query;Lorg/postgresql/core/BaseStatement;[Lorg/postgresql/core/Field;Ljava/util/List;Lorg/postgresql/core/ResultCursor;IIIII)V from class org.postgresql.jdbc.PgStatement", :backtrace=>["org.postgresql.jdbc.PgStatement.createResultSet(org/postgresql/jdbc/PgStatement.java:158)", "org.postgresql.jdbc.PgStatement$StatementResultHandler.handleResultRows(org/postgresql/jdbc/PgStatement.java:208)", "org.postgresql.core.v3.QueryExecutorImpl.processResults(org/postgresql/core/v3/QueryExecutorImpl.java:2127)", "org.postgresql.core.v3.QueryExecutorImpl.execute(org/postgresql/core/v3/QueryExecutorImpl.java:300)", "org.postgresql.jdbc.PgStatement.executeInternal(org/postgresql/jdbc/PgStatement.java:428)", "org.postgresql.jdbc.PgStatement.execute(org/postgresql/jdbc/PgStatement.java:354)", "org.postgresql.jdbc.PgStatement.executeWithFlags(org/postgresql/jdbc/PgStatement.java:301)", "org.postgresql.jdbc.PgStatement.executeCachedSql(org/postgresql/jdbc/PgStatement.java:287)"]}
[2019-05-10T13:52:58,457][ERROR][logstash.filters.jdbc.readwritedatabase] Exception when filling lookup db from loader remote-servers, query results, original exception: LogStash::Filters::Jdbc::LookupJdbcException, original message: Exception occurred when executing loader Jdbc query count {:backtrace=>["org.postgresql.jdbc.PgStatement.createResultSet(org/postgresql/jdbc/PgStatement.java:158)", "org.postgresql.jdbc.PgStatement$StatementResultHandler.handleResultRows(org/postgresql/jdbc/PgStatement.java:208)", "org.postgresql.core.v3.QueryExecutorImpl.processResults(org/postgresql/core/v3/QueryExecutorImpl.java:2127)", "org.postgresql.core.v3.QueryExecutorImpl.execute(org/postgresql/core/v3/QueryExecutorImpl.java:300)", "org.postgresql.jdbc.PgStatement.executeInternal(org/postgresql/jdbc/PgStatement.java:428)", "org.postgresql.jdbc.PgStatement.execute(org/postgresql/jdbc/PgStatement.java:354)", "org.postgresql.jdbc.PgStatement.executeWithFlags(org/postgresql/jdbc/PgStatement.java:301)", "org.postgresql.jdbc.PgStatement.executeCachedSql(org/postgresql/jdbc/PgStatement.java:287)", "org.postgresql.jdbc.PgStatement.executeWithFlags(org/postgresql/jdbc/PgStatement.java:264)", "org.postgresql.jdbc.PgStatement.executeQuery(org/postgresql/jdbc/PgStatement.java:231)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)", "org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:453)", "org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:314)", "RUBY.block in execute(/users/Pratyaksh.Kumar/bash/logstash-6.0.1/vendor/bundle/jruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/jdbc.rb:232)", "RUBY.log_connection_yield(/Users/Pratyaksh.Kumar/bash/logstash-6.0.1/vendor/bundle/jruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/logging.rb:38)", "RUBY.block in execute(/users/Pratyaksh.Kumar/bash/logstash-6.0.1/vendor/bundle/jruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/jdbc.rb:232)"]}
[2019-05-10T13:52:58,475][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"claim_gbas", :plugin=>"#<LogStash::FilterDelegator:0x5a1082a7 @metric_events_out=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - namespace: [stats, pipelines, claim_gbas, plugins, filters, edd4488fd41252da334ddf50c7b5eca4d5878bf923be1e2e876f814d92c49ddc, events] key: out value:0, @metric_events_in=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - namespace: [stats, pipelines, claim_gbas, plugins, filters, edd4488fd41252da334ddf50c7b5eca4d5878bf923be1e2e876f814d92c49ddc, events] key: in value:0, @logger=#<LogStash::Logging::Logger:0x40c4ccd6 @logger=#Java::OrgApacheLoggingLog4jCore::Logger:0x6f68b437>, @metric_events_time=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - namespace: [stats, pipelines, claim_gbas, plugins, filters, edd4488fd41252da334ddf50c7b5eca4d5878bf923be1e2e876f814d92c49ddc, events] key: duration_in_millis value:0, @id="edd4488fd41252da334ddf50c7b5eca4d5878bf923be1e2e876f814d92c49ddc", @klass=LogStash::Filters::JdbcStatic, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x3a618617 @metric=#<LogStash::Instrument::Metric:0x5c255ff1 @collector=#<LogStash::Instrument::Collector:0x7646814e @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x43e5d4d6 @store=#<Concurrent:0x00000000000fb4 entries=3 default_proc=nil>, @structured_lookup_mutex=#Mutex:0x7582b383, @fast_lookup=#
We are unable to find which version we are using wrong. We have tried using most latest version of postgres also.
Also I have noticed that this plugin uses sequel gem for database connectivity. Its version is sequel (5.20.0). Is this causing the error.