Pierre Mauduit ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A585344fb-ece9-47e9-8382-30cea0b98063
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYTRjZWE0NzE5YzljNDc2MDkxZTY2ODI5Y2YxNTg1OGQiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-10824?atlOrigin=eyJpIjoiYTRjZWE0NzE5YzljNDc2MDkxZTY2ODI5Y2YxNTg1OGQiLCJwIjoiaiJ9
 ) GEOS-10824 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10824?atlOrigin=eyJpIjoiYTRjZWE0NzE5YzljNDc2MDkxZTY2ODI5Y2YxNTg1OGQiLCJwIjoiaiJ9
 ) gs-flatgeobuf extension can clash with "directory of shapefiles" datastores 
( 
https://osgeo-org.atlassian.net/browse/GEOS-10824?atlOrigin=eyJpIjoiYTRjZWE0NzE5YzljNDc2MDkxZTY2ODI5Y2YxNTg1OGQiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.20.4 Assignee: Unassigned Created: 
13/Jan/23 2:07 PM Environment:

Encountered on a geOrchestra geoserver 2.20.4, including gs-flatgeobuf 
extension, but this may affect more recent versions as well.

* docker image being used relies on an official jetty docker image
* linux environment, kernel v4.4.0

Priority: Medium Reporter: Pierre Mauduit ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A585344fb-ece9-47e9-8382-30cea0b98063
 )

This issue has been reported on the geoserver-devel mailing-list:

https://sourceforge.net/p/geoserver/mailman/geoserver-devel/thread/CAHTJp2Stfaz8b%2BDuafketpYag1K3nTe40Vi7tFKk3ZpQVCrO6g%40mail.gmail.com/#msg37761887
 ( 
https://sourceforge.net/p/geoserver/mailman/geoserver-devel/thread/CAHTJp2Stfaz8b%2BDuafketpYag1K3nTe40Vi7tFKk3ZpQVCrO6g%40mail.gmail.com/#msg37761887
 )

When using a GeoServer along with the gs-flatgeobuf extension, the 
gt-flatgeobuf comes naturally as a dependency, and this might cause issues with 
datastores, because GeoServer could select the wrong factory to manage said 
datastores. From our understanding this following call to 
getAvailableDataStoreFactories () could be the cause:

https://github.com/geoserver/geoserver/blob/main/src/main/src/main/java/org/vfny/geoserver/util/DataStoreUtils.java#L92
 ( 
https://github.com/geoserver/geoserver/blob/main/src/main/src/main/java/org/vfny/geoserver/util/DataStoreUtils.java#L92
 )

There are no ordering in the collection being returned, and canProcess() 
methods from both factories will return true with the given params hashmap:

* 
https://github.com/geotools/geotools/blob/main/modules/unsupported/flatgeobuf/src/main/java/org/geotools/data/flatgeobuf/FlatGeobufDataStoreFactory.java#L90-L104
 ( 
https://github.com/geotools/geotools/blob/main/modules/unsupported/flatgeobuf/src/main/java/org/geotools/data/flatgeobuf/FlatGeobufDataStoreFactory.java#L90-L104
 )
* 
https://github.com/geotools/geotools/blob/main/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java#L305-L344
 ( 
https://github.com/geotools/geotools/blob/main/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/ShapefileDataStoreFactory.java#L305-L344
 )

So depending on the order, we can end up with a “directory of shapefiles” 
datastore which would be handled by a FlatGeobufDatastoreFactory, resulting in 
every underlying layers fail.

One workaround from our side had been to remove the flatgeobuf extension (incl. 
the gt-flatgeobuf jar from the webapp’s classpath), as the format was actually 
not needed/not in use in our environment.

( 
https://osgeo-org.atlassian.net/browse/GEOS-10824#add-comment?atlOrigin=eyJpIjoiYTRjZWE0NzE5YzljNDc2MDkxZTY2ODI5Y2YxNTg1OGQiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-10824#add-comment?atlOrigin=eyJpIjoiYTRjZWE0NzE5YzljNDc2MDkxZTY2ODI5Y2YxNTg1OGQiLCJwIjoiaiJ9
 )

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#100214- 
sha1:b03f6a4 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to