# JDBC Plugin - Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject

**URL:** <https://discuss.elastic.co/t/jdbc-plugin-missing-converter-handling-for-full-class-name-org-postgresql-util-pgobject-simple-name-pgobject/163772>\
**Category:** Logstash\
**Created:** [January 10, 2019, 3:43pm UTC](https://discuss.elastic.co/t/jdbc-plugin-missing-converter-handling-for-full-class-name-org-postgresql-util-pgobject-simple-name-pgobject/163772 "2019-01-10T15:43:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesamuir](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jamesamuir](https://discuss.elastic.co/u/jamesamuir)\
**Post date:** [January 10, 2019, 3:43pm UTC](https://discuss.elastic.co/t/jdbc-plugin-missing-converter-handling-for-full-class-name-org-postgresql-util-pgobject-simple-name-pgobject/163772/1 "2019-01-10T15:43:34Z")

</div>

Hello,  
I am trying to determine how to get the JDBC plugin to correctly load JSON and JSONB field types from PostgreSQL. I am running Postgres 9.5 and Logstash 6.5. Here is an example to replicate.

create table if not exists public.test\_products  
(  
product\_id bigserial not null  
constraint test\_products\_pkey  
primary key,  
product\_name text,  
options json not null,  
created timestamp with time zone default now()  
);

INSERT INTO public.test\_products (product\_name, options) VALUES ('caticorn shirt', '{"color": "green", "size": "large"}');

And my logstash config.

input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:postgresql://localhost:5432/shop1"  
jdbc\_user =\> "user"  
jdbc\_password =\> "\*\*\*\*\*\*\*"  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "/opt/drivers/postgresql-42.2.5.jar"  
jdbc\_driver\_class =\> "org.postgresql.Driver"  
statement =\> "SELECT product\_id, product\_name, options FROM public.test\_products"  
}  
}  
output {  
elasticsearch {  
index =\> "products"  
document\_type =\> "\_doc"  
hosts =\> ["localhost:9200"]  
}  
}

Running Logstash with this config generates the following error

**Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject**

which is due to the inclusion of the "options" JSON field (verified by removing if from the select statement and restarting Logstash successfully).

I have also tried to convert the options to a TEXT type (options::TEXT) and specify the field as "nested" in a template but the index mapping is always "text". I am assuming that this is due to the format of the field not being valid JSON due to the conversion.

Has anyone else run into this and found a solution or is there a suggested methodology for importing JSON and JSONB fields into Elastic using the Logstash JDBC plugin?

-James

---

<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:** [February 7, 2019, 3:43pm UTC](https://discuss.elastic.co/t/jdbc-plugin-missing-converter-handling-for-full-class-name-org-postgresql-util-pgobject-simple-name-pgobject/163772/2 "2019-02-07T15:43:36Z")

</div>

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