We have a webapp which consumes services published on ArcGIS Server. All database relevant operations are done with ESRI ArcGIS abilities. We now switched from Oracle 11g to PostgreSQL 9.4 with PostGIS 2.5. Although everything is done with Esri ArcGIS abilities it is necessary to make changes on the code (this may be bad design of the app or maybe it's unavoidable... doesn't matter at the moment). I made these changes as far as I can see and almost everything is working fine, except adding/editing features via the exposed feature layers.
When trying to add a feature ArcGIS Server will report an error like this in the log:
Error: Underlying DBMS-Error[Error: Geometry has Z dimension but column does not ({featureclass})::SQLSTATE=22023].
The table is defined with Point and another table with Polygon. So it is correct that the column does not support Z dimension. But I'm using the ArcGIS JavaScript API 3 which doesn't support Z coordinates at all according to the point documentation. The featurelayers also don't support Z and M values.
When looking with Chrome developer tools what data are sent to the server I get something like this:
[{
"geometry": {
"x": 6359.682509019719,
"y": 7720831.9973746035,
"spatialReference": {
"wkid": 3857
}
},
"attributes": {
<mylist of attributes>
}
}]
The geometry looks fine and has nothing with Z. I checked the attributes multiple times that they have the correct spelling, having valid values and are all lower case (what is default for identifiers in PostgreSQL).
When using this example (of course with the attributes) on the FeatureServer REST website and adding the feature via "addFeatures" I get following JSON feedback:
{
"error": {
"code": 400,
"message": "Unable to complete operation.",
"details": [
"Rowbuffer creation failed."
]
}
}
This is some more information but I still don't know what does cause this problem. In the server logs I will again have the error message above.
What could cause such an error message when using featurelayers in combination with PostGIS?
Edit:
The problem only occurs when adding new features to the layer. If I'm deleting or editing a feature everything works fine and the changes are passed to the database without errors.