[GIS] Feature Type Unknown exception in GeoServer WFS request

geonodegeoserverwfs

I recently upgraded GeoServer from 2.12 to 2.142 because of a GeoNode update. A WFS GetFeature link failed in the new version of GeoServer:

http://myhost/geoserver/wfs?service=wfs&version=2.0.0&request=GetFeature&typeName=geonode:fr_admin1&outputformat=SHAPE-ZIP

The error message I got was something like:

<ows:Exception exceptionCode="InvalidParameterValue" locator="typeName">
    ows:ExceptionText>Feature type geonode:fr_admin1 unknown</ows:ExceptionText>

There is an exception "Feature type unknown" returned. However, I never had this issue in GeoServer ver. 2.12. Is there any changes for the WFS GetFeature request in GeoServer ver. 2.14? How to solve this problem?

Best Answer

Both typeName and typeNames work fine on a local machine for me.

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp%3Atasmania_cities

and

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typename=topp%3Atasmania_cities

Things to check:

  1. Make sure that you really have a layer geonode:fr_admin1 and it is enabled.
  2. Test with a standard data layer (like topp:tasmania_cities).
  3. look in the log file to see if there is an error message.
  4. Turn logging level up to GEOSERVER_DEVELOPER and check again.
Related Question