Hi,
I am using Esri Nuget (100.13.0) in my Xamarin project. On ServiceFeatureTable LoadAsync I am getting an exception i.e Domain exists.
Code for loading feature table:
if (featureServers != null && featureServers.Any())
await Task.WhenAll(featureServers.ToList().Select(m => m.LoadAsync()).ToList());
Json of Layer :
{
"currentVersion": 10.8,
"id": 1,
"name": "Enclosed Storage Facility",
"type": "Feature Layer",
"description": "",
"geometryType": "esriGeometryPoint",
"sourceSpatialReference": {
"wkid": 2273,
"latestWkid": 2273
},
"copyrightText": "",
"parentLayer": {
"id": 0,
"name": "Water"
},
"subLayers": [
],
"minScale": 10000,
"maxScale": 0,
"drawingInfo": {
"renderer": {
"type": "uniqueValue",
"field1": "Subtype",
"field2": null,
"field3": null,
"defaultSymbol": null,
"defaultLabel": null,
"uniqueValueInfos": [
{
"symbol": {
"type": "esriPMS",
"url": "d5ecc3ce5222edf4b9313a9ecce936ab",
"imageData": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAQ1JREFUGJV9kLFqwlAUhj/iqTfQZGiEPEARFQIRSte7BAS7uOQ5Ogo+QvFdCi5ukjxBSjJXaCCjUyGCVwJ2EDO0Jd94zs9/OJ9w5VUp9UkHxhhfANbrdb1cLsuObGXbthaAxWLxBvgd4RcA+T1tmoY8z7EsiyAIUEq1OwGoqupuPB5zuVzYbrdEUYSIkKYps9mMXq8H8CQASZLcK6Wo65rRaITrugBMp1M2mw37/T42xjwKwGQyOWut+6fTiSzL2rOHwwGtNXEcv69Wq1gAhsPhGcC2bVzXZbfbYVkWjuPg+9e/Pc/7EIDBYNDc2sIw/FfH8Xj8EoCyLPsif8S0FEXxbIz5FoD5fP7Q4bjlBwDBUFjVlVnaAAAAAElFTkSuQmCC",
"contentType": "image/png",
"width": 8,
"height": 8,
"angle": 0,
"xoffset": 0,
"yoffset": 0
},
"value": "1",
"label": "Clear Well",
"description": ""
},
{
"symbol": {
"type": "es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7ub0yq6oFu4lnzV/vsOxhd/popqdcwAAAAAElFTkSuQmCC",
"contentType": "image/png",
"width": 20,
"height": 18,
"angle": 0,
"xoffset": 0,
"yoffset": 0
},
"value": "2",
"label": "Tank",
"description": ""
}
],
"fieldDelimiter": ","
},
"transparency": 0,
"labelingInfo": null
},
"defaultVisibility": true,
"extent": {
"xmin": 2082147.4036115408,
"ymin": 119245.07191300392,
"xmax": 2093068.52033557,
"ymax": 134971.3898985237,
"spatialReference": {
"wkid": 2273,
"latestWkid": 2273
}
},
"hasAttachments": false,
"htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText",
"displayField": "Name",
"typeIdField": "Subtype",
"subtypeFieldName": "Subtype",
"subtypeField": "Subtype",
"defaultSubtypeCode": 2,
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID",
"domain": null
},
{
"name": "Subtype",
"type": "esriFieldTypeInteger",
"alias": "Subtype",
"domain": null
},
{
"name": "FacilityID",
"type": "esriFieldTypeString",
"alias": "Tank ID",
"length": 25,
"domain": null
},
{
"name": "AssetNumber",
"type": "esriFieldTypeString",
"alias": "Asset Number",
"length": 25,
"domain": null
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name",
"length": 25,
"domain": null
},
{
"name": "Capacity",
"type": "esriFieldTypeString",
"alias": "Capacity",
"length": 25,
"domain": null
},
{
"name": "Depth",
"type": "esriFieldTypeString",
"alias": "Depth",
"length": 25,
"domain": null
},
{
"name": "OperatingMax",
"type": "esriFieldTypeString",
"alias": "Operating Max",
"length": 25,
"domain": null
},
{
"name": "OperatingMin",
"type": "esriFieldTypeString",
"alias": "Operating Min",
"length": 25,
"domain": null
},
{
"name": "Diameter1",
"type": "esriFieldTypeDouble",
"alias": "Diameter 1",
"domain": {
"type": "codedValue",
"name": "WS2_PressMainDiameter",
"description": "",
"codedValues": [
{
"name": "2\"",
"code": 2
},
{
"name": "4\"",
"code": 4
},
{
"name": "6\"",
"code": 6
},
{
"name": "8\"",
"code": 8
},
{
"name": "10\"",
"code": 10
},
{
"name": "12\"",
"code": 12
},
{
"name": "14\"",
"code": 14
},
{
"name": "16\"",
"code": 16
},
{
"name": "20\"",
"code": 20
},
{
"name": "24\"",
"code": 24
},
{
"name": "36\"",
"code": 36
},
{
"name": "Other",
"code": -1
},
{
"name": "Unknown",
"code": 0
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "Diameter2",
"type": "esriFieldTypeDouble",
"alias": "Diameter 2",
"domain": {
"type": "codedValue",
"name": "WS2_PressMainDiameter",
"description": "",
"codedValues": [
{
"name": "2\"",
"code": 2
},
{
"name": "4\"",
"code": 4
},
{
"name": "6\"",
"code": 6
},
{
"name": "8\"",
"code": 8
},
{
"name": "10\"",
"code": 10
},
{
"name": "12\"",
"code": 12
},
{
"name": "14\"",
"code": 14
},
{
"name": "16\"",
"code": 16
},
{
"name": "20\"",
"code": 20
},
{
"name": "24\"",
"code": 24
},
{
"name": "36\"",
"code": 36
},
{
"name": "Other",
"code": -1
},
{
"name": "Unknown",
"code": 0
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "LifeCycleStatus",
"type": "esriFieldTypeString",
"alias": "Life Cycle Status",
"length": 3,
"domain": {
"type": "codedValue",
"name": "WS2_LifeCycleStatus",
"description": "",
"codedValues": [
{
"name": "Active",
"code": "ACT"
},
{
"name": "Inactive",
"code": "INA"
},
{
"name": "Proposed",
"code": "PRO"
},
{
"name": "Abandoned",
"code": "ABN"
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "InstallDate",
"type": "esriFieldTypeDate",
"alias": "Install Date",
"length": 8,
"domain": {
"type": "range",
"name": "WS2_DateRange",
"description": "",
"range": [
-2208988800000,
4133894400000
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "WorkOrderID",
"type": "esriFieldTypeString",
"alias": "Work Order ID",
"length": 15,
"domain": null
},
{
"name": "AssetImportance",
"type": "esriFieldTypeString",
"alias": "Asset Importance",
"length": 15,
"domain": {
"type": "codedValue",
"name": "WS2_Asset Importance",
"description": "",
"codedValues": [
{
"name": "Critical",
"code": "CRT"
},
{
"name": "Non-Critical",
"code": "NCT"
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "Elevation",
"type": "esriFieldTypeDouble",
"alias": "Elevation",
"domain": null
},
{
"name": "WaterType",
"type": "esriFieldTypeString",
"alias": "Water Type",
"length": 3,
"domain": {
"type": "codedValue",
"name": "WS2_WaterType",
"description": "",
"codedValues": [
{
"name": "Potable",
"code": "POT"
},
{
"name": "Raw",
"code": "RAW"
},
{
"name": "Treated",
"code": "TRT"
},
{
"name": "Effluent",
"code": "EFF"
},
{
"name": "Reclamed",
"code": "REC"
},
{
"name": "Sewage",
"code": "SWG"
},
{
"name": "Combination",
"code": "CMB"
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "Section",
"type": "esriFieldTypeString",
"alias": "Section",
"length": 25,
"domain": {
"type": "codedValue",
"name": "WS2_Section",
"description": "",
"codedValues": [
{
"name": "278",
"code": "278"
},
{
"name": "BCPSD Plant",
"code": "PSD"
},
{
"name": "Disney",
"code": "DSY"
},
{
"name": "Golf",
"code": "GLF"
},
{
"name": "Inverness",
"code": "INV"
},
{
"name": "Leamington",
"code": "LMT"
},
{
"name": "Mariner",
"code": "MAR"
},
{
"name": "Ocean Front",
"code": "OCF"
},
{
"name": "Queens Folly Road",
"code": "QFR"
},
{
"name": "Queens Grant",
"code": "QNG"
},
{
"name": "Shelter Cove",
"code": "SHC"
},
{
"name": "St. Andrews",
"code": "STA"
},
{
"name": "The Village",
"code": "TVL"
},
{
"name": "Yacht Cove",
"code": "YHT"
},
{
"name": "Other",
"code": "OTR"
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "OperationalArea",
"type": "esriFieldTypeString",
"alias": "Operational Area",
"length": 3,
"domain": {
"type": "codedValue",
"name": "WS2_OperationalArea",
"description": "",
"codedValues": [
{
"name": "BCPSD",
"code": "PSD"
},
{
"name": "BJWSA",
"code": "BJW"
},
{
"name": "Commercial",
"code": "COM"
},
{
"name": "Golf",
"code": "GLF"
},
{
"name": "HHPSD",
"code": "HPS"
},
{
"name": "Regimes",
"code": "REG"
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "LocationDescription",
"type": "esriFieldTypeString",
"alias": "Location Description",
"length": 50,
"domain": null
},
{
"name": "LocationMethod",
"type": "esriFieldTypeString",
"alias": "Location Method",
"length": 4,
"domain": {
"type": "codedValue",
"name": "WS2_LocationMethod",
"description": "",
"codedValues": [
{
"name": "Aerial Photo",
"code": "AP"
},
{
"name": "As-Built",
"code": "ASB"
},
{
"name": "CAD Conversion",
"code": "CAD"
},
{
"name": "Estimated",
"code": "EST"
},
{
"name": "Field Measurement",
"code": "FM"
},
{
"name": "Mapping Grade GPS",
"code": "MGPS"
},
{
"name": "Survey Data",
"code": "SRV"
},
{
"name": "Other",
"code": "OTH"
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "GPSDate",
"type": "esriFieldTypeDate",
"alias": "GPS Date",
"length": 8,
"domain": {
"type": "range",
"name": "WS2_DateRange",
"description": "",
"range": [
-2208988800000,
4133894400000
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDuplicate"
}
},
{
"name": "Notes",
"type": "esriFieldTypeString",
"alias": "Notes",
"length": 50,
"domain": null
},
{
"name": "WaterStructureObjID",
"type": "esriFieldTypeInteger",
"alias": "WaterStructureObjID",
"domain": null
},
{
"name": "Enabled",
"type": "esriFieldTypeSmallInteger",
"alias": "Enabled",
"domain": {
"type": "codedValue",
"name": "WS2_EnabledDomain",
"description": "",
"codedValues": [
{
"name": "False",
"code": 0
},
{
"name": "True",
"code": 1
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "SHAPE",
"type": "esriFieldTypeGeometry",
"alias": "SHAPE",
"domain": null
},
{
"name": "Longitude",
"type": "esriFieldTypeString",
"alias": "Longitude",
"length": 25,
"domain": null
},
{
"name": "Latitude",
"type": "esriFieldTypeString",
"alias": "Latitude",
"length": 25,
"domain": null
},
{
"name": "Height",
"type": "esriFieldTypeString",
"alias": "Height",
"length": 15,
"domain": null
},
{
"name": "Creator",
"type": "esriFieldTypeString",
"alias": "Creator",
"length": 15,
"domain": null
},
{
"name": "DateCreated",
"type": "esriFieldTypeDate",
"alias": "Date Created",
"length": 8,
"domain": null
},
{
"name": "Editor",
"type": "esriFieldTypeString",
"alias": "Editor",
"length": 15,
"domain": null
},
{
"name": "DateEdited",
"type": "esriFieldTypeDate",
"alias": "Date Edited",
"length": 8,
"domain": null
}
],
"geometryField": {
"name": "SHAPE",
"type": "esriFieldTypeGeometry",
"alias": "SHAPE"
},
"indexes": [
{
"name": "R41_SDE_ROWID_UK",
"fields": "OBJECTID",
"isAscending": true,
"isUnique": true,
"description": ""
},
{
"name": "G3WaterStructure",
"fields": "WaterStructureObjID",
"isAscending": true,
"isUnique": false,
"description": ""
},
{
"name": "a3_ix1",
"fields": "SHAPE",
"isAscending": true,
"isUnique": true,
"description": ""
}
],
"types": [
{
"domains": {
"Diameter1": {
"type": "inherited"
},
"Diameter2": {
"type": "inherited"
},
"LifeCycleStatus": {
"type": "inherited"
},
"InstallDate": {
"type": "inherited"
},
"AssetImportance": {
"type": "inherited"
},
"WaterType": {
"type": "inherited"
},
"Section": {
"type": "inherited"
},
"OperationalArea": {
"type": "inherited"
},
"LocationMethod": {
"type": "inherited"
},
"GPSDate": {
"type": "inherited"
},
"Enabled": {
"type": "inherited"
}
},
"id": 1,
"name": "Clear Well"
},
{
"domains": {
"Diameter1": {
"type": "inherited"
},
"Diameter2": {
"type": "inherited"
},
"LifeCycleStatus": {
"type": "inherited"
},
"InstallDate": {
"type": "inherited"
},
"AssetImportance": {
"type": "inherited"
},
"WaterType": {
"type": "inherited"
},
"Section": {
"type": "inherited"
},
"OperationalArea": {
"type": "inherited"
},
"LocationMethod": {
"type": "inherited"
},
"GPSDate": {
"type": "inherited"
},
"Enabled": {
"type": "inherited"
}
},
"id": 2,
"name": "Tank"
}
],
"subtypes": [
{
"domains": {
"Diameter1": {
"type": "inherited"
},
"Diameter2": {
"type": "inherited"
},
"LifeCycleStatus": {
"type": "inherited"
},
"InstallDate": {
"type": "inherited"
},
"AssetImportance": {
"type": "inherited"
},
"WaterType": {
"type": "inherited"
},
"Section": {
"type": "inherited"
},
"OperationalArea": {
"type": "inherited"
},
"LocationMethod": {
"type": "inherited"
},
"GPSDate": {
"type": "inherited"
},
"Enabled": {
"type": "inherited"
}
},
"defaultValues": {
"Subtype": 1,
"FacilityID": null,
"AssetNumber": null,
"Name": null,
"Capacity": null,
"Depth": null,
"OperatingMax": null,
"OperatingMin": null,
"Diameter1": null,
"Diameter2": null,
"LifeCycleStatus": "ACT",
"InstallDate": null,
"WorkOrderID": null,
"AssetImportance": null,
"Elevation": null,
"WaterType": "POT",
"Section": null,
"OperationalArea": null,
"LocationDescription": null,
"LocationMethod": null,
"GPSDate": null,
"Notes": null,
"WaterStructureObjID": null,
"Enabled": 1,
"Longitude": null,
"Latitude": null,
"Height": null,
"Creator": null,
"DateCreated": null,
"Editor": null,
"DateEdited": null
},
"code": 1,
"name": "Clear Well"
},
{
"domains": {
"Diameter1": {
"type": "inherited"
},
"Diameter2": {
"type": "inherited"
},
"LifeCycleStatus": {
"type": "inherited"
},
"InstallDate": {
"type": "inherited"
},
"AssetImportance": {
"type": "inherited"
},
"WaterType": {
"type": "inherited"
},
"Section": {
"type": "inherited"
},
"OperationalArea": {
"type": "inherited"
},
"LocationMethod": {
"type": "inherited"
},
"GPSDate": {
"type": "inherited"
},
"Enabled": {
"type": "inherited"
}
},
"defaultValues": {
"Subtype": 1,
"FacilityID": null,
"AssetNumber": null,
"Name": null,
"Capacity": null,
"Depth": null,
"OperatingMax": null,
"OperatingMin": null,
"Diameter1": null,
"Diameter2": null,
"LifeCycleStatus": "ACT",
"InstallDate": null,
"WorkOrderID": null,
"AssetImportance": null,
"Elevation": null,
"WaterType": "POT",
"Section": null,
"OperationalArea": null,
"LocationDescription": null,
"LocationMethod": null,
"GPSDate": null,
"Notes": null,
"WaterStructureObjID": null,
"Enabled": 1,
"Longitude": null,
"Latitude": null,
"Height": null,
"Creator": null,
"DateCreated": null,
"Editor": null,
"DateEdited": null
},
"code": 2,
"name": "Tank"
}
],
"relationships": [
],
"canModifyLayer": true,
"canScaleSymbols": false,
"hasLabels": false,
"capabilities": "Map,Query,Data",
"maxRecordCount": 1000,
"supportsStatistics": true,
"supportsAdvancedQueries": true,
"supportedQueryFormats": "JSON, geoJSON",
"isDataVersioned": true,
"ownershipBasedAccessControlForFeatures": {
"allowOthersToQuery": true
},
"useStandardizedQueries": true,
"advancedQueryCapabilities": {
"useStandardizedQueries": true,
"supportsStatistics": true,
"supportsHavingClause": true,
"supportsCountDistinct": true,
"supportsOrderBy": true,
"supportsDistinct": true,
"supportsPagination": true,
"supportsTrueCurve": true,
"supportsReturningQueryExtent": true,
"supportsQueryWithDistance": true,
"supportsSqlExpression": true
},
"supportsDatumTransformation": true,
"dateFieldsTimeReference": null,
"supportsCoordinatesQuantization": true
}
This error can come up when a Domain is used by two fields with different field types: for example, Table A uses the domain with a String field, but Table B uses the domain with a Double field. Domains are shared amongst all tables in the database, and if a table tries to create a Domain with a matching name but some other differing property, this “Domain exists” error is thrown.
We're working on improving the error message to make it more clear which domain is causing this.