Question

FeatureWriter failing due to schema lock on FGDB?

  • 9 April 2024
  • 2 replies
  • 47 views

Badge +1
  • Contributor
  • 3 replies

I’m migrating to ArcGIS Pro and working on a workflow to convert geodb_pro_annotations to geodb_annotations so that I can edit/create annotations in ArcGIS Pro and downgrade them so that they can be used in ArcMap and read with a legacy tool (that currently has no ArcGIS Pro upgrade path).

I seem to be having an issue writing some of the features to a new local FGDB where the FeatureWriter errors out with the following message:

“An error occurred while attempting to create a feature using the feature class 'StreetName_Rural_Smaller_LEVEL_63'. The error number from ArcObjects is: '-2147220947'. The error message from ArcObjects is: {Cannot acquire a lock.}”

The data is created/edited in an SDE and exported to a local FGDB for this downgrade. There are 25 annotation features containing 1 to 2,000,000 annotation records. This error seems to only occur on annotation features with more than 500,000 annotation records. The others are able to be written out to the FGDB with no issues.

I’ve tried running it from the SDE itself, from a local FGDB, with feature caching (on/off), and I’ve also tried adding a Decelerator to slow down the FeatureWriter in case it was trying to write too many features at once.

Each troubleshooting iteration seems to error on a different record. When I isolate those erroring records using a TestFilter they get written with no issues. So, I don’t believe that it’s a data issue.

Any help or troubleshooting tips would be appreciated.


2 replies

Userlevel 3
Badge +19

Hi jar,

If you are writing out a new file gdb each workspace run, try under the Parameters of the file geodatabase writer/feature writer there should be an option to “overwrite” existing file gdb. 
Also try emptying the feature cache and closing the workbench on occasion. Also close an ArcMap/ArcPro instance that might be locking featureclasses/dataset. 
Hope that helps!

cheers, James 

Badge +1

Hey James,

I tried some of your suggestions and I’m still running into the same issue.

A new GDB is created for each run, and I have set the parameters to “Overwrite”, the feature cache has been cleared, all other instances of ArcMap/ArcPro/FME were closed and I also made sure to close and open the workbench before running it.

I’m going to try running the workbench on a different machine and see if that has any impact.

Reply