I have an ArcGIS Runtime SDK for .NET WPF 100.0.0 based application which reads data from a queue, converts that data into a feature and stores that feature in a feature service based mobile geodatabase. The application will periodically sync that geodatabase back to the feature server. These errors occur from several different places within the application. They only seem to occur when the application is attempting to sync, but it does sync successfully more often than not. Any ideas about what might be causing this issue? Do I need to pause all sync jobs while editing the database?
Message: Esri.ArcGISRuntime.ArcGISRuntimeException: A table in the database is locked
at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreTask.Get()
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler`1.OnCompleted(Object sender, EventArgs e)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler`1.<CreateInternal>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Data.FeatureTable.<QueryFeaturesInternal>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SpatialScene.ArcGISRuntimeModule.ViewModels.QueryTabUserControlViewModel.<RefreshAsync>d__69.MoveNext() in C:\Users\Mattd\Source\Repos\SpatialScene\SpatialScene\SpatialScene.ArcGISRuntimeModule\ViewModels\QueryTabUserControlViewModel.cs:line 301
Message: Esri.ArcGISRuntime.ArcGISRuntimeException: A table in the database is locked
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Data.FeatureTable.<QueryFeaturesInternal>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SpatialScene.ArcGISRuntimeModule.ViewModels.QueryTabUserControlViewModel.<RefreshAsync>d__69.MoveNext() in C:\Users\Mattd\Source\Repos\SpatialScene\SpatialScene\SpatialScene.ArcGISRuntimeModule\ViewModels\QueryTabUserControlViewModel.cs:line 301
Message: Esri.ArcGISRuntime.ArcGISRuntimeException: A table in the database is locked
at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreTask.Get()
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler`1.OnCompleted(Object sender, EventArgs e)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler`1.<CreateInternal>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Data.FeatureTable.<UpdateFeatureAsync>d__60.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at SpatialScene.Data.Geodatabase.<ParseLocation>d__16.MoveNext() in C:\Users\Mattd\Source\Repos\SpatialScene\SpatialScene\SpatialScene.Data\Geodatabase.cs:line 636
Matthew Dickinson did you ever find a solution to this? We're seeing something similar when attempting to sync data from Collector to a hosted Feature layer in ArcGIS Enterprise v10.7.1. We're getting the "A table in the database is locked" error, but intermittently and apparently every other attempt.
How many people are concurrently syncing?
Hi,
What platform/version of Collector are you running?
Thanks
Mike
Hi,
In the recent v100.8 release we resolved a sync issue with the same error message (`A table in the database is locked`).
Are you able to update your app and retest with the latest version?
Thanks
Mike