[Geoserver-devel] [JIRA] (GEOS-8963) org.geoserver.catalog.ResourcePool.getFeatureSource(ResourcePool.java:1266)

Barent Brouwers created an issue

GeoServer / WishGEOS-8963

org.geoserver.catalog.ResourcePool.getFeatureSource(ResourcePool.java:1266)

Issue Type:

WishWish

Assignee:

Unassigned

Created:

04/Oct/18 11:53 AM

Priority:

LowLow

Reporter:

Barent Brouwers

To make life easier we made a C#-tool to copy workspaces in a single GeoServer instance.
When we change the element <name> in featuretype.xml from the original to the copy, then everything works fine.
When we don’t change the element <name>, then we get the following error :

Caused by: java.io.IOException: Schema ‘www.xxxxxxxxx.nl/0410181117:v_KDPGegevens_Geo’ does not exist.
at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:535)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:333)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:594)
at org.geoserver.catalog.ResourcePool.getFeatureSource(ResourcePool.java:1266)
at org.geoserver.catalog.impl.FeatureTypeInfoImpl.getFeatureSource(FeatureTypeInfoImpl.java:123)

Looking at the code below from org.geoserver.catalog.ResourcePool * there’s something with *name , nativeName and nativeFeatureType , renamedFeatureType .
We’d like to know more about what happens here and if this explains the behavior we encounter…

 //
        // aliasing and type mapping
        //
        final String typeName = info.getNativeName();
        final String alias = info.getName();
        final SimpleFeatureType nativeFeatureType = dataStore.getSchema(typeName);
        final SimpleFeatureType renamedFeatureType =
                (SimpleFeatureType) getFeatureType(info, false);
        if (!typeName.equals(alias)
                || DataUtilities.compare(nativeFeatureType, renamedFeatureType) != 0) {
            // rename and retype as necessary
            fs =
                    RetypingFeatureSource.getRetypingSource(
                            dataStore.getFeatureSource(typeName), renamedFeatureType);
        } else {
            // normal case
            fs = dataStore.getFeatureSource(info.getQualifiedName());
        }

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100093-sha1:b93f5f5)

Atlassian logo