geoserver 2.21, app schema/smart data loader/ogc api/feature templating plugins (Tomcat 9 on Ubuntu 22.04; openjdk 11.0.16)
Hello, I appreciate any help on the following two (related?) problems (further explained below): 1. The "Smart Data Loader" plugin fails in case Array Type is present in one of the tables (error unknown data type) 2. The "Feature Templating" plugin does not handle data from columns with Array Type correctly ("[Ljava.lang.String;@..."<mailto:[Ljava.lang.String;@...>) Of particular importance to me is to solve problem 2, as this directly affects geoserver output. Many thanks in advance, Henning ----- Problem 1: * I create two tables, one without and one without a column of Array Type (called here "noarray_table" and "array_table"; only for explanation instead of my more complex setup): CREATE TABLE test.noarray_table ( id SERIAL PRIMARY KEY, geometry geometry(point, 4326), attribute1 varchar, attribute2 varchar ); CREATE TABLE test.array_table ( id SERIAL PRIMARY KEY, geometry geometry(point, 4326), attribute1 varchar, attribute2 varchar[] ); * After adding some data, I create a PostGIS data store for database that contains the tables. * When this is done, I add a new data store and select "Smart Data Loader". * When I select the noarray_table as root entity, I get the expected preview and can add the data store. * However, when I select the array_table, I get an error message over the entire page. As far as I can tell, the critical line is "Caused by: java.lang.RuntimeException: Attribute type '_varchar' is unknown.". _varchar is the same as varchar[] as far as I can tell. Is this a bug or does Smart Data Loader not support Array Types ("missing feature")? Problem 2: The Feature Templating plugin explicitly supports Array Types (see https://docs.geoserver.org/stable/en/user/community/features-templating/directives.html#array-based-properties-json-based-templates-only) * With the Smart Data Loader, I create an app schema mapping and schema of tables without Array Type * I configure feature templating and I get valid output. * However, one of the columns should actually be of array type. Thus, I replace this varchar-column by a varchar[]-column, including type casting of the content. * According to the documentation, I expect that the Array Type of the column is recognised by the plugin and the data are expanded accordingly. * However, I see "[Ljava.lang.String;@..."<mailto:[Ljava.lang.String;@...> instead of data. According to what I could find out, this indicates the presence of array data where no array data are expected. This leaves two options: A) It is not sufficient to just change the Data Type in the database, something in the configuration has to be changed as well (App Schema mapping file, schema - although Array Type is not supported for XML according to the documentation, which would suggest that this is not the case). B) The Feature Templating plugin doesn't work as expected, i.e. it's a bug. När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users