[Qgis-user] Anybody to confirm this WFS problem?
Richard Duivenvoorde
rdmailings at duif.net
Sun Oct 21 22:59:39 PDT 2018
On 10/18/2018 10:50 AM, magerlin wrote:
> Thanks for your input (which I do not fully understand ;-)
>
> I think you are pointing at possible problems at the server of the data
> distributor?
>
> But QGIS 2.18 reads it without problems - only QGIS 3 cannot?
Hi Morten,
My last conclusion was simply wrong (the one with the crs problem), I
copied-pasted the wrong url (added the : on the end).
This part:
2018-10-12T11:43:25 WFS[1] Server generated an exception in GetFeature
response: java.lang.RuntimeException: java.lang.RuntimeException:
java.io.IOException
java.lang.RuntimeException: java.io.IOException
java.io.IOExceptionCannot do natural order without a primary key, please
add it or specify a manual sort over existing attributes
is a java exception, so is thrown by your(!) geoserver.
The url QGIS is firing (also in the stacktrace):
http://wfs1.erst.dk/fingerplan17/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=fingerplan17:test&STARTINDEX=0&COUNT=1&SRSNAME=urn:ogc:def:crs:EPSG::25832
Means that QGIS is asking for an ordered(!) feature list (with
startindex and count). QGIS does this because a WFS 2.0.0 server is able
to page through it's features, meaning you can request eg 10000 features
in steps of 2000.
So to be able to do this (that is, to be able to only server every
feature ONCE in between this serie of steps), your server has to be able
to determine the uniqueness of your features. Meaning your data(!) has
to be a primary key. Meaning if you have a database there should be
either a primary key on one of your columns, OR you add a
'Unique-Constraint' on an (unique) column.
And that is I think why Geoserver is complaining (and QGIS is receiving
this error message instead of a set of features).
That is the reason QGIS is only able to open your dataset with an WFS
1.0.0 request (WFS 1.0.0 does not have 'paging', so Geoserver is not so
picky about the structure of your data).
So it is a combination of issues in the geoserver setup, data and the
fact that QGIS is getting 'smarter' and tries to page through data.
HTH :-)
Regards,
Richard DUivenvoorde
More information about the Qgis-user
mailing list