I'm trying to open an WFS from my GeoServer in QGIS. But with very little success. I'm getting an error: "Error when parsing GetFeature response : Error: not well-formed (invalid token) on line 1"

Searching this error indicates it could be an encoding issue... My data is on a PostGIS database with encoding = Latin1, and my GeoServer is set to UTF-8. Could be the problem, but changing GeoServer global settings to "ISO-8859-1" which should be equal to latin1, does not help.

Any ideas that might fix it?

postgis version: 9.4.10 geroserver version : 2.11.1 qgis version 2.18.7

  • 1
    Have you checked the geoserver logs? – BradHards Jul 5 '17 at 10:38
  • Yes - but I'm afraid it's not clear text to me... – Lars Christensen Jul 5 '17 at 11:12
  • the first lines looks like this: Oops, something went wrong... Sorry, something unexpected happened on the server. Here's an error report you can include in a JIRA bug report about this issue: org.apache.wicket.WicketRuntimeException: Exception in rendering component: [TextArea [Component id = logs]] at org.apache.wicket.Component.internalRenderComponent(Component.java:2625) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668) at org.apache.wicket.Component.internalRender(Component.java:2401) at org.apache.wicket.Component.render(Component.java:2329) – Lars Christensen Jul 5 '17 at 11:12
  • 1
    So thats a bug (or misconfiguration) on the server side. I have no idea what it is from that part of the stacktrace. Suggest filing a JIRA ticket on the geoserver bug tracker, including exactly how you configured GeoServer, what the full stacktrace shows, what the data source is, what the specific layer configuration is, and anything else that is specific to that layer. – BradHards Jul 5 '17 at 11:38
  • Ok - I'l tjek with our suppliers on the geoserver. Thanks a lot :-) – Lars Christensen Jul 5 '17 at 12:08

I had a same problem. In Geoserver I had layers with names that contained spaces and dashes. When I renamed them using only letters and underscore, problem was gone.


Adding to the answer from Zoran Petrović, it will also not open if the layer starts with a number.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.