# Logstash JDBC Static filter plugin failing with postgres DB

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-static-filter-plugin-failing-with-postgres-db/180592>\
**Category:** Logstash\
**Created:** [May 10, 2019, 4:37pm UTC](https://discuss.elastic.co/t/logstash-jdbc-static-filter-plugin-failing-with-postgres-db/180592 "2019-05-10T16:37:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar-pratyaksh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar-pratyaksh/32/35050_2.png) [@kumar-pratyaksh](https://discuss.elastic.co/u/kumar-pratyaksh)\
**Post date:** [May 10, 2019, 4:37pm UTC](https://discuss.elastic.co/t/logstash-jdbc-static-filter-plugin-failing-with-postgres-db/180592/1 "2019-05-10T16:37:55Z")

</div>

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.

---

<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 7, 2019, 4:38pm UTC](https://discuss.elastic.co/t/logstash-jdbc-static-filter-plugin-failing-with-postgres-db/180592/2 "2019-06-07T16:38:19Z")

</div>

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