cancel
Showing results for 
Search instead for 
Did you mean: 

Error:class java.util.ArrayList cannot be cast to class java.sql.Array

Ganeshu108
New Contributor II

Hello ,
I am facing following issue while inserting data into postgres database from json file.

Error : class java.util.ArrayList cannot be cast to class java.sql.Array (java.util.ArrayList is in module java.base of loader ‘bootstrap’; java.sql.Array is in module java.sql of loader ‘platform’).

image

image

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@ganesh1

I guess that you should transform the JSON in flatten format (split any nested structures from the JSON) before you insert in PostgreSQL table.

BR,
Spiro Taleski

View solution in original post

3 REPLIES 3

SpiroTaleski
Valued Contributor

@ganesh1

I guess that you should transform the JSON in flatten format (split any nested structures from the JSON) before you insert in PostgreSQL table.

BR,
Spiro Taleski

Thank You !

Ganeshu108
New Contributor II

Worked perfectly  thank you!