Eric Stadtherr (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A9c03e679-b4cc-43d1-8d49-bfc87195089d
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMTA2MjY0NTZlNTRkNDEwZjgxZTkxMTg3ZjUyZjhmNjkiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-10661?atlOrigin=eyJpIjoiMTA2MjY0NTZlNTRkNDEwZjgxZTkxMTg3ZjUyZjhmNjkiLCJwIjoiaiJ9
) GEOS-10661 (
https://osgeo-org.atlassian.net/browse/GEOS-10661?atlOrigin=eyJpIjoiMTA2MjY0NTZlNTRkNDEwZjgxZTkxMTg3ZjUyZjhmNjkiLCJwIjoiaiJ9
) ValidationException thrown by REST API when creating feature type with
custom field names (
https://osgeo-org.atlassian.net/browse/GEOS-10661?atlOrigin=eyJpIjoiMTA2MjY0NTZlNTRkNDEwZjgxZTkxMTg3ZjUyZjhmNjkiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.21.0 Assignee: Unassigned Components: REST
Created: 20/Sep/22 3:50 PM Environment:
Running in tomcat:9.0-jdk11-openjdk-slim based container
Priority: Medium Reporter: Eric Stadtherr (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A9c03e679-b4cc-43d1-8d49-bfc87195089d
)
GeoServer returns a "500" error and logs a
org.geoserver.catalog.ValidationException exception when using the REST API to
create a feature type that defines a custom name for a field.
The exception logged is:
org.geoserver.catalog.ValidationException: The CQL source expression for
attribute <custom name> refers to attributes unavailable in the data source:
[<custom name>]
at
org.geoserver.catalog.impl.FeatureTypeValidator.validate(FeatureTypeValidator.java:90)
~[gs-main-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
at
org.geoserver.catalog.impl.FeatureTypeValidator.validate(FeatureTypeValidator.java:48)
~[gs-main-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
at
org.geoserver.catalog.impl.CatalogImpl.validate(CatalogImpl.java:515)
~[gs-main-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
at
org.geoserver.security.SecureCatalogImpl.validate(SecureCatalogImpl.java:1320)
~[gs-main-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
at
org.geoserver.catalog.impl.AbstractFilteredCatalog.validate(AbstractFilteredCatalog.java:633)
~[gs-main-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
at
org.geoserver.catalog.impl.AbstractCatalogDecorator.validate(AbstractCatalogDecorator.java:274)
~[gs-main-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
at
org.geoserver.rest.catalog.FeatureTypeController.featureTypePost(FeatureTypeController.java:281)
~[gs-restconfig-2.21-SNAPSHOT.jar:2.21-SNAPSHOT]
Steps to reproduce the issue:
#. build and run geoserver 2.21.x with elasticsearch extension
#. from web UI, create workspace
#. from web UI, create elasticsearch datastore in workspace
#. from web UI, create a layer from the elasticsearch datastore and specify a
custom name for at least one field that differs from the actual field name
#. export feature type from REST API - GET
/rest/workspaces/<workspace>/featuretypes/<featuretype>
#. delete layer
#. create identical feature type from exported file - POST
/rest/workspaces/<workspace>/datastores/<datastore>/featuretypes
The error can be reproduced without first creating and the layer in the web UI,
and skipping right to the POST of the feature type, but this method is both an
easy way to construct a valid feature type document, and demonstrates that a
valid layer produces the exception.
(
https://osgeo-org.atlassian.net/browse/GEOS-10661#add-comment?atlOrigin=eyJpIjoiMTA2MjY0NTZlNTRkNDEwZjgxZTkxMTg3ZjUyZjhmNjkiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-10661#add-comment?atlOrigin=eyJpIjoiMTA2MjY0NTZlNTRkNDEwZjgxZTkxMTg3ZjUyZjhmNjkiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100207-
sha1:866f7d8 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel