Hi @lawrence, Were you able to resolve the issue.
When updating existing Feature services, please use FeatureMerger as demonstrated in this article
https://knowledge.safe.com/articles/19302/how-do-i-write-updates-to-an-existing-arcgis-onlin.html
The problem had been resolved. In my case, when updating a feature service, all attributes in the feature service must be lower case, no space no special characters. The attribute type must be identical and string width must match or larger.
I have the same issue (getting the '500' error about JSONObjects) but I'm unable to get the Feature Merger to work properly. I can successfully do Inserts and Deletes (similar to the workbench shared here - https://community.safe.com/s/article/how-do-i-write-updates-to-an-existing-arcgis-onlin) but when it comes to Updates the workbench never succeeds in writing updated records. This is against our Portal.
I am noticing the same behavior as chadprop.
Hi @chadprop and @lmawhinney7175
We would like to investigate this further but would require additional information
Are you getting Timeout errors or is it possible that the UPDATE query is failing due to some invalid features. There are few troubleshooting tips that we can try
- Can you confirm that you are using FME Desktop 2019.2 or newer version there were some recent updates to fix number of retries to connect to server see here AGOL Troubleshooting
- Set the Feature Per Request to a lower number (1) to check we are encountering a bad feature
- Confirm that there are no Network related issues
- If you are still having an issue, please file a support ticket, along with workspace and log files https://www.safe.com/support/report-a-problem/
Hi @rahulsharma
I am using Version 2019.2.2.0. Per you suggestion, I changed the "Features Per Request" to 1. I am now seeing a new error. "The error code from the server was '10512' and the message was: 'Update for the object was not attempted. Object may not exist." Does this mean anything to you?
Hi @rahulsharma
I am using Version 2019.2.2.0. Per you suggestion, I changed the "Features Per Request" to 1. I am now seeing a new error. "The error code from the server was '10512' and the message was: 'Update for the object was not attempted. Object may not exist." Does this mean anything to you?
I think we have to investigate the request further. One of the method is try using Fiddler or Wireshark to investigate the response and check is send to the server. It is possible there it could be a bad attribute or unknown OBJECTID or the unique ID that you selected.
Could you file a support ticket so we can investigate this further?
Hi @rahulsharma
Thank you for your quick response. I can file a support ticket. I don't there is a bad attribute that I know of, but there is always a chance. Thanks!
Hi @chadprop and @lmawhinney7175
We would like to investigate this further but would require additional information
Are you getting Timeout errors or is it possible that the UPDATE query is failing due to some invalid features. There are few troubleshooting tips that we can try
- Can you confirm that you are using FME Desktop 2019.2 or newer version there were some recent updates to fix number of retries to connect to server see here AGOL Troubleshooting
- Set the Feature Per Request to a lower number (1) to check we are encountering a bad feature
- Confirm that there are no Network related issues
- If you are still having an issue, please file a support ticket, along with workspace and log files https://www.safe.com/support/report-a-problem/
Hi @rahulsharma ,
Not sure if this could be the root cause of my Portal's particular issue, but I know that in our configuration that we have 'disabled' the REST framework on purpose. For instance, if I click on a feature I've published to Portal (either from Server, or directly as a Hosted feature) I see this instead of the usual REST info:
Error: Services Directory has been disabled.
Code: 403
Let me know if FME relies on the Services Directory to be enabled.
Thanks
Hi @rahulsharma
I am using Version 2019.2.2.0. Per you suggestion, I changed the "Features Per Request" to 1. I am now seeing a new error. "The error code from the server was '10512' and the message was: 'Update for the object was not attempted. Object may not exist." Does this mean anything to you?
@lmawhinney7175 , I'm getting the same 10512 error. Just curious, is your Services Directory disabled on Portal as well? See above post. THX
Hi @rahulsharma ,
Not sure if this could be the root cause of my Portal's particular issue, but I know that in our configuration that we have 'disabled' the REST framework on purpose. For instance, if I click on a feature I've published to Portal (either from Server, or directly as a Hosted feature) I see this instead of the usual REST info:
Error: Services Directory has been disabled.
Code: 403
Let me know if FME relies on the Services Directory to be enabled.
Thanks
Hi @chadprop
FME relies on REST API calls to read and write the data on portals. As per my understanding the ServicesDirectory has to be enabled for all the hosted services to work properly.
If you can check with your admin to turn it ON and try again.
Hi @rahulsharma ,
Not sure if this could be the root cause of my Portal's particular issue, but I know that in our configuration that we have 'disabled' the REST framework on purpose. For instance, if I click on a feature I've published to Portal (either from Server, or directly as a Hosted feature) I see this instead of the usual REST info:
Error: Services Directory has been disabled.
Code: 403
Let me know if FME relies on the Services Directory to be enabled.
Thanks
@rahulsharma ,
Sorry for taking so long to get back. I have verified that the REST Services directory has been enabled on Portal and I'm still getting the error message:
ArcGIS Portal Feature Service Writer: 'addResults' error for a feature in 'Recloser'. The error code from the server was '10500' and the message was: 'Database error has occurred.
'ArcGIS Portal Feature Service Writer: 0 features successfully written to 'Recloser', but the server rejected the 130 features in the last request due to errors. See warnings above. Aborting translation
On a closer look, if I run the individual operations separately by disabling the other 2 (Update, Insert, delete) I get a successful translation. Update and delete work fine, but now Insert gives me a slightly different error:
ArcGIS Portal Feature Service Writer: Writing features for layer/table 'Recloser', with 0 inserts, 2 updates, and 0 deletesArcGIS Portal Feature Service Writer: 'updateResults' error for a feature in 'Recloser'. The error code from the server was '10512' and the message was: 'Update for the object was not attempted. Object may not exist.'
I know this is an old post but I had similar errors and in my case the issue is totally unrelated to the errors mesasge
- Attribute values with forward slashes '/' cause an error like this
- values going to numeric fields with commas
So in general I would say incompatible attribute values may cause an error like this and I am guessing the Portal API used by FME does not return very nice errors.
I know this is an old post but I had similar errors and in my case the issue is totally unrelated to the errors mesasge
- Attribute values with forward slashes '/' cause an error like this
- values going to numeric fields with commas
So in general I would say incompatible attribute values may cause an error like this and I am guessing the Portal API used by FME does not return very nice errors.
Thanks for this - it helped me get to the cause of my error too. For me it was removing ":" from all attribute values which fixed it (after setting transactions to 1).