Problems connecting to a WFS server from other vendor

Description

I am trying to connect GeoServer with a secondary WFS server from another vendor (Luciad, OGCServices).
I created datastore and it got accepted by GeoServer.
I went to create a Layer and when I try to publish I get the following error:

This is what I get using GeoServer 2.13

Caused by: java.lang.RuntimeException: org.geotools.data.DataSourceException: No XSDElementDeclaration found for {http://www.opengis.net/wfs}cities at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:358) at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:325) at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:345) at org.geoserver.feature.retype.RetypingDataStore.updateMap(RetypingDataStore.java:214) at org.geoserver.feature.retype.RetypingDataStore.getFeatureSource(RetypingDataStore.java:170) at org.geoserver.feature.retype.RetypingDataStore.getFeatureSource(RetypingDataStore.java:327) at org.geoserver.feature.retype.RetypingDataStore.getFeatureSource(RetypingDataStore.java:49) at org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:376) at org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:401) ... 112 more Caused by: org.geotools.data.DataSourceException: No XSDElementDeclaration found for {http://www.opengis.net/wfs}cities at org.geotools.data.wfs.internal.parsers.EmfAppSchemaParser.parseFeatureType(EmfAppSchemaParser.java:306) at org.geotools.data.wfs.internal.parsers.EmfAppSchemaParser.parse(EmfAppSchemaParser.java:217) at org.geotools.data.wfs.internal.DescribeFeatureTypeResponse.<init>(DescribeFeatureTypeResponse.java:65) at org.geotools.data.wfs.internal.parsers.DescribeFeatureTypeResponseFactory.createResponse(DescribeFeatureTypeResponseFactory.java:63) at org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:220) at org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:38) at org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:445) at org.geotools.data.wfs.internal.WFSClient.internalIssueRequest(WFSClient.java:298) at org.geotools.data.wfs.internal.WFSClient.issueRequest(WFSClient.java:360) at org.geotools.data.wfs.WFSDataStore.getRemoteFeatureType(WFSDataStore.java:210) at org.geotools.data.wfs.WFSDataStore.getRemoteSimpleFeatureType(WFSDataStore.java:264) at org.geotools.data.wfs.WFSFeatureSource.buildFeatureType(WFSFeatureSource.java:348) at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:356) ... 120 more

And this is what I get from 2.9-SNAPSHOT (shipped with GeoNode 2.6.3)

Caused by: java.lang.RuntimeException: org.opengis.referencing.NoSuchAuthorityCodeException: Authority "OGC" is unknown or doesn't match the supplied hints. Maybe it is defined in an unreachable JAR file? at org.geotools.data.wfs.internal.v1_x.FeatureTypeInfoImpl.getCRS(FeatureTypeInfoImpl.java:130) at org.geotools.data.wfs.internal.DescribeFeatureTypeResponse.<init>(DescribeFeatureTypeResponse.java:51) at org.geotools.data.wfs.internal.parsers.DescribeFeatureTypeResponseFactory.createResponse(DescribeFeatureTypeResponseFactory.java:59) at org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:220) at org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:38) at org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:445) at org.geotools.data.wfs.internal.WFSClient.internalIssueRequest(WFSClient.java:288) at org.geotools.data.wfs.internal.WFSClient.issueRequest(WFSClient.java:350) at org.geotools.data.wfs.WFSDataStore.getRemoteFeatureType(WFSDataStore.java:214) at org.geotools.data.wfs.WFSDataStore.getRemoteSimpleFeatureType(WFSDataStore.java:268) at org.geotools.data.wfs.WFSFeatureSource.buildFeatureType(WFSFeatureSource.java:348) at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:343) at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:312) at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:112) at org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:351) at org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:333) at org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:359) ... 120 more Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: Authority "OGC" is unknown or doesn't match the supplied hints. Maybe it is defined in an unreachable JAR file? at org.geotools.referencing.factory.ManyAuthoritiesFactory.noSuchAuthority(ManyAuthoritiesFactory.java:489) at org.geotools.referencing.factory.ManyAuthoritiesFactory.getAuthorityFactory(ManyAuthoritiesFactory.java:467) at org.geotools.referencing.factory.ManyAuthoritiesFactory.getCRSAuthorityFactory(ManyAuthoritiesFactory.java:548) at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:801) at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802) at org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:640) at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802) at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802) at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731) at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179) at org.geotools.referencing.CRS.decode(CRS.java:525) at org.geotools.data.wfs.internal.v1_x.FeatureTypeInfoImpl.getCRS(FeatureTypeInfoImpl.java:128) ... 136 more Caused by: org.geotools.factory.FactoryNotFoundException: No factory of kind "CRSAuthorityFactory" found. at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:375) at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:145) at org.geotools.referencing.ReferencingFactoryFinder.getAuthorityFactory(ReferencingFactoryFinder.java:220) at org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactory(ReferencingFactoryFinder.java:440) at org.geotools.referencing.factory.AllAuthoritiesFactory.fromFactoryRegistry(AllAuthoritiesFactory.java:118) at org.geotools.referencing.factory.ManyAuthoritiesFactory.getAuthorityFactory(ManyAuthoritiesFactory.java:452) ... 146 more

Please, I am at a loss to where start working and I have to integrate these two products.

Thank you very much!

Environment

GeoServer 2.13

Activity

Javier Urien 
July 31, 2018 at 1:45 PM
(edited)

I have a quote from Luciad Support that states:

[The Geoserver] issue is related to the typename / XML name issue. Geoserver tries to look for (http://www.opengis.net/wfs)city_125 in the XML / XML Schema data, but this doesn't exist. This is as expected, because {http://www.opengis.net/wfs}city_125 is indeed not defined in the server. The root cause seems to be that Geoserver can't cope with a WFS feature type that only has a name definition ("city_125") and not a corresponding namespace; in this case, it seems to take a hardcoded assumption that the namespace is (http://www.opengis.net/wfs).

Regards

Javier Urien 
July 31, 2018 at 1:36 PM

Andrea,

On a related issue [1] but with QGis client, there is a ticket opened and a server has been made available. I believe that this test server might be useful for this issue.

Best Regards

[1] https://issues.qgis.org/issues/19505

Andrea Aime 
July 30, 2018 at 7:44 PM

If you can point developers to a publicly accessible server that can be used to reproduce the issue, that will be around for a few months at least, it makes sense to keep this ticket open.
Otherwise best to close this ticket and contact commercial support (they will also likely need access to the server, but there you can negotiate opening ports for specific IP addresses, using VPNs or SSH tunnels, signing CLAs, and the like, all things that spare time, volunteer support offered here does not provide).

Details

Assignee

Reporter

Priority

Created July 23, 2018 at 6:03 PM
Updated July 31, 2018 at 1:45 PM