2

I have a shapefile. I want to load the shapefile in to QGIS but I am not able to load it. The shapefile is a layer in GeoServer (2.23.2) and loaded into QGIS (3.28.15) vis WFS 2.0.0 connection.

  1. QGIS logs-

Download of features for layer ne:Chintareddypalem failed or partially failed: WFS exception report (code=NoApplicableCode text=java.lang.RuntimeException: Error encoding object to xml-element Error encoding object to xml-element

  1. QGIS logs-

INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.).

  1. GeoServer logs-

[shapefile.files] - Unable to replace original file with temporary fter a write operation.. java.io.FileNotFoundException: /home/azureuser/geoserver/Chintareddy/chintareddy/Chintareddypalem.qix (Permission denied) ERROR [data.shapefile] - Couldn't replace original file with a temporary after a write operation. Because of:/home/azureuser/geoserver/Chintareddy/chintareddy/Chintareddypalem.qix (Permission denied)

I am using QGIS on a Windows system and GeoServer is running on Tomcat in a Linux VM.

Note-

  1. The file is in a azure container mounted to Linux using blobfuse.

  2. I am not able to load this particular shapefile only, other are working fine.

  3. I have tried downloading the file to my Windows local system and directly load to QGIS instead via GeoServer and I am able to save the edits.

  4. I have no plugins installed.

How can I resolve this issue?

1
  • You tagged raster but are using a GeoServer WFS, a WFS doesn't serve raster data, it serves vector data; changed the tag from raster to wfs
    – nmtoken
    Jan 31 at 11:52

2 Answers 2

3

The error seems quite clear:

/home/azureuser/geoserver/Chintareddy/chintareddy/Chintareddypalem.qix (Permission denied) ERROR [data.shapefile] - Couldn't replace original file with a temporary after a write operation. Because of:/home/azureuser/geoserver/Chintareddy/chintareddy/Chintareddypalem.qix (Permission denied)

GeoServer doesn't have permission to create the new index file in the /home/azureuser/geoserver/Chintareddy/chintareddy/ directory. You need to use chmod to give the user running GeoServer write permission to that directory.

0

There are two possible causes:

  1. The XML file actually contains a disallowed character (for example a control character such as form-feed). In this case you need to (a) repair the invalid file, and/or (b) identify the root cause of the invalidity and fix it so it doesn't happen again.

  2. The XML file was written with a particular character encoding, and is being read with a different encoding, causing some of the bytes in the file to decode incorrectly. In this case transcoding the file, or configuring your application to read it with the correct encoding, may fix the problem.

First step is to work out which of these two explanations applies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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