AnsweredAssumed Answered

Message: Esri.ArcGISRuntime.ArcGISRuntimeException: A table in the database is locked

Question asked by mattd@911datamaster.com on Jun 28, 2017

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

Outcomes