1

I am facing two issues with applyEdits through JavaScript API.

1. Unable to perform applyEdits

When I perform ApplyEdits on feature service, I get the error "Unable to complete operation". When checked the Server logs, it showed:

Error: The current version does not support editing (base, consistent, or closed) [An open transaction was detected. All user transactions must be closed prior to StartEditing.]

But in JavaScript API, there is no such command for StartEditing or StopEditing. Moreover, I am not using versioning for editing. I am directly applying the edits to the DEFAULT version.

Is there any way to handle the StartEditing and StopEditing through code?

2. Getting “Success” message for applyEdits but feature not getting added in feature service

At other times while editing, even if the features get added and a "Success" message from the feature service is shown yet the features are not visible in the feature service. Upon restarting/refreshing the feature service, those added features are also lost.

These solutions were tried:

• Tested using only mandatory fields for ‘ApplyEdits’ instead of all fields

• Tried inserting features from REST

• Dropped the main table

• Recreated the table from backup

• Recreated the table from scratch

• Restarted the Map service

• Deleted the Map service

• Recreated the Map service and the MD used to publish the service.

Seldom it works fine immediately after the service is refreshed/restarted but not after sometime.

What can be the possible causes/solutions behind this?

  • This could be a geodatabase issue rather than a javascript one. Can you edit the feature class through ArcMap? This should tell you if the feature class is correctly versioned and registered with the geodatabase. Also what RDMS is SDE sitting in? – Dowlers Sep 21 '16 at 3:56
  • Dowlers, The feature class can be edited from ArcMap at the same time when I am unable to do so through code or REST. I am using Oracle 11g. – User Android Sep 22 '16 at 4:53
  • I'm seeing that error when I try to insert a self-intersecting polygon into a polygon featureservice. It fails on the insert, but then get the above error on subsequent attempts to insert. It's as if the service is not aborting the editoperation when it gets the first error, then can't start a new editoperation since one is underway. (just guessing) – Kirk Kuykendall Apr 18 '17 at 12:42

Your Answer

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

Browse other questions tagged or ask your own question.