ERROR

Error 160250: "Objects in this class cannot be updated outside an edit session" when editing a branch versioned feature service

Last Published: July 2, 2024

Error Message

Sometimes editing a branch versioned feature service returns the error:

"Objects in this class cannot be updated outside an edit session"

The following image shows this error in the Apply Event Behaviors tool.

error shown in geoprocessing tool

Note: 
This does not solely occur on the Apply Event Behaviors tool, but in general when editing.

Cause

Only certain dataset types can be updated in an edit session, as described in 160250: Objects in this class cannot be updated outside an edit session, however this error can be caused when a user adds a feature class to an already registered dataset.

Solution or Workaround

The following steps can be used when this is caused by adding a feature class to an already registered dataset:

  1. Stop the already published feature service in Server Manager, this is to ensure we can acquire an exclusive schema lock.
  2. In ArcGIS Pro, unregister all of the feature datasets from within the enterprise geodatabase (EGDB) via the Unregister as Versioned geoprocessing tool.
  3. Re-register the entire EGDB and the feature datasets within the EDGB individually.
It may be preferable to registered the datasets manually, instead of running the Register as Versioned geoprocessing tool.
  1. Republish the feature service, either a brand new feature service, or overwrite the existing feature service. If you choose to overwrite, ensure the feature service is re-started in Server Manager.
  2. After republishing the feature service, bring it back into ArcGIS Pro and make a few edits, you should now be able to perform edits/run tools without encountering the error.
Caution:
The one consideration before unregistering a feature dataset/feature class as versioned, is to reconcile and post any edits to Default. Not doing this step can result in lost edits, see: Unregister As Versioned (Data Management)

Article ID:000032404

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options