In Java backend I try to make a query via geotools. It works fine until I try to make a query with attibute of type "double precision[]".
First geotools log a Warning:
org.geotools.jdbc.JDBCFeatureSource buildFeatureType
WARNING: Could not find mapping for '<my column name>', ignoring the column and setting the feature type read only
And then somewhere deep down, more or less around PostGISDialect level, it throws a NullPointerException. I tried to debug whole thing and I found that for JDBCFeatureSource "double precision[]" is "_float8" (typeName) and sqlType is "2003" (which is ARRAY in java.sql.Types). And JDBFeatureSource can not find binding neither for _float8 nor for SQL ARRAY type. I tried to find some information if I can extend geotools with my own data type but I failed. Does anyone has any idea how can I use "double precision[]" type with geotools?
Ciao, simply put you cannot right now.
Longer explanation, I don't think there is a mapper in GeoTools PostGISDialect for that type of data. You might want to provide a patch for it, it should not be too hard.
Simone.