AnsweredAssumed Answered

ArcGISException: Not found: Field does not exist.

Question asked by lucianoac on Apr 18, 2017
Latest reply on Apr 19, 2017 by lucianoac



I have been struggling with a weird exception lately. My context:


- Xamarin Forms (testing on a Android device)
- Basemap/BaseLayers loaded successfully
- While loading some feature tables from a SQLite geodatabase (multiple tables are loaded properly except by two similar ones)


Relevant parts:


    var geodatabase = await Geodatabase.OpenAsync(<path>);
    var featureTables = geodatabase.GeodatabaseFeatureTables;
    foreach (var featureTable in featureTables)
        var featureLayer = new FeatureLayer(featureTable);
        featureLayer.Name = featureTable.TableName;
        _mapView.Map.OperationalLayers.Add(featureLayer);  //Exception thrown on the ase_ctaponto and ase_cteponto
catch (Exception ex)
    throw ex; //Breakpoint here


The exception:


Type: ArcGISException
Message: "Not found: Field does not exist."
ErrorCode: 7
InnerException: (null)
  at Esri.ArcGISRuntime.ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException) [0x00013] in <687a544c38e8410dbac0acfc0843ba7e>:0
  at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError (System.IntPtr errorHandle, System.Boolean throwOnFailure, System.Runtime.InteropServices.GCHandle wrapperHandle) [0x0002e] in <687a544c38e8410dbac0acfc0843ba7e>:0
  at RuntimeCoreNet.GeneratedWrappers.CoreVector.Insert (System.Int64 position, RuntimeCoreNet.GeneratedWrappers.CoreElement value) [0x00020] in <687a544c38e8410dbac0acfc0843ba7e>:0
  at Esri.ArcGISRuntime.RuntimeCollection`1[T].InsertItem (System.Int32 index, T item) [0x00064] in <687a544c38e8410dbac0acfc0843ba7e>:0
  at Esri.ArcGISRuntime.RuntimeObservableCollection`1[T].InsertItem (System.Int32 index, T item) [0x0000d] in <687a544c38e8410dbac0acfc0843ba7e>:0
  at Esri.ArcGISRuntime.RuntimeCollection`1[T].Add (T item) [0x00007] in <687a544c38e8410dbac0acfc0843ba7e>:0
  at TEST.LoadMapBehavior+<CarregarCamadasEditaveis>d__41.MoveNext () [0x0049d] in Path/MyFile.cs:198


We tried regenerate the geodatabase file multiple times, both on ArcMap desktop and inside the app using ArcGis rest services API.



What I am missing? If I failed to provide sufficient information about the problem, please let me know.