<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic 000042: Failed to create the address locator.Failed to execute (CreateAddressLocator) in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/000042-failed-to-create-the-address-locator-failed/m-p/401581#M10722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apologies, if this is the wrong forum to post in. I am upgrading an application from using ArcObjects 9.3 to 10.2. It???s coded in C# using Visual Studio 2010. I???ve got almost everything working except for the option to create a locator from a shapefile. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here???s the code that I???m calling:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Geoprocessor gp = new Geoprocessor();
CreateAddressLocator addressLocatorGPTool = new CreateAddressLocator("US Address - Dual Ranges", referenceData, fieldMap, addressLocator);
ITrackCancel cancel = new CancelTrackerClass();
gp.OverwriteOutput = true;
try
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Execute(addressLocatorGPTool, cancel);
}
catch(Exception exc)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object severity = 2;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string errors = gp.GetMessages(ref severity);

}
addressLocatorGPTool = null;
gp = null;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the variable values being passed in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;referenceData &lt;/STRONG&gt;&lt;SPAN&gt;= "C:\7.0 Source\CSServer\bin\Debug\Maps\streetcl.shp" 'Primary table'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldMap &lt;/STRONG&gt;&lt;SPAN&gt;= 'Feature ID' FID VISIBLE NONE;'*From Left' L_F_ADD VISIBLE NONE;'*To Left' L_T_ADD VISIBLE NONE;'*From Right' R_F_ADD VISIBLE NONE;'*To Right' R_T_ADD VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' &amp;lt;None&amp;gt; VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' TYPE VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Right City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Left Zipcode' ZIPL VISIBLE NONE;'Right Zipcode' ZIPR VISIBLE NONE;'Left State' &amp;lt;None&amp;gt; VISIBLE NONE;'Right State' &amp;lt;None&amp;gt; VISIBLE NONE&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;addressLocator &lt;/STRONG&gt;&lt;SPAN&gt;= C:\7.0 Source\CSServer\bin\Debug\Maps\LOC_Hamilton&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It always hits my exception handler with an error that says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:#ff0000;"&gt;System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Geoprocessor.Geoprocessor.ExecuteInner(IGPProcess process, ITrackCancel trackCancel, IGeoProcessor igp, IVariantArray iva)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Geoprocessor.Geoprocessor.Execute(IGPProcess process, ITrackCancel trackCancel)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error message that comes back from gp.GetMessages = &lt;/SPAN&gt;&lt;SPAN style="color:#ff0000;"&gt;???ERROR 000042: Failed to create the address locator.&lt;BR /&gt;Failed to execute (CreateAddressLocator).???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to know what I???m doing wrong? The error is vague. I???ve been wrestling with this for a couple days now and I would really appreciate the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mario Suau&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Federal Signal - Alerting and Notification Systems&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jan 2014 19:46:54 GMT</pubDate>
    <dc:creator>MarioSuau</dc:creator>
    <dc:date>2014-01-06T19:46:54Z</dc:date>
    <item>
      <title>000042: Failed to create the address locator.Failed to execute (CreateAddressLocator)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/000042-failed-to-create-the-address-locator-failed/m-p/401581#M10722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apologies, if this is the wrong forum to post in. I am upgrading an application from using ArcObjects 9.3 to 10.2. It???s coded in C# using Visual Studio 2010. I???ve got almost everything working except for the option to create a locator from a shapefile. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here???s the code that I???m calling:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Geoprocessor gp = new Geoprocessor();
CreateAddressLocator addressLocatorGPTool = new CreateAddressLocator("US Address - Dual Ranges", referenceData, fieldMap, addressLocator);
ITrackCancel cancel = new CancelTrackerClass();
gp.OverwriteOutput = true;
try
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Execute(addressLocatorGPTool, cancel);
}
catch(Exception exc)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object severity = 2;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string errors = gp.GetMessages(ref severity);

}
addressLocatorGPTool = null;
gp = null;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the variable values being passed in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;referenceData &lt;/STRONG&gt;&lt;SPAN&gt;= "C:\7.0 Source\CSServer\bin\Debug\Maps\streetcl.shp" 'Primary table'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldMap &lt;/STRONG&gt;&lt;SPAN&gt;= 'Feature ID' FID VISIBLE NONE;'*From Left' L_F_ADD VISIBLE NONE;'*To Left' L_T_ADD VISIBLE NONE;'*From Right' R_F_ADD VISIBLE NONE;'*To Right' R_T_ADD VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' &amp;lt;None&amp;gt; VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' TYPE VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Right City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Left Zipcode' ZIPL VISIBLE NONE;'Right Zipcode' ZIPR VISIBLE NONE;'Left State' &amp;lt;None&amp;gt; VISIBLE NONE;'Right State' &amp;lt;None&amp;gt; VISIBLE NONE&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;addressLocator &lt;/STRONG&gt;&lt;SPAN&gt;= C:\7.0 Source\CSServer\bin\Debug\Maps\LOC_Hamilton&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It always hits my exception handler with an error that says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:#ff0000;"&gt;System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Geoprocessor.Geoprocessor.ExecuteInner(IGPProcess process, ITrackCancel trackCancel, IGeoProcessor igp, IVariantArray iva)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Geoprocessor.Geoprocessor.Execute(IGPProcess process, ITrackCancel trackCancel)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error message that comes back from gp.GetMessages = &lt;/SPAN&gt;&lt;SPAN style="color:#ff0000;"&gt;???ERROR 000042: Failed to create the address locator.&lt;BR /&gt;Failed to execute (CreateAddressLocator).???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to know what I???m doing wrong? The error is vague. I???ve been wrestling with this for a couple days now and I would really appreciate the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mario Suau&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Federal Signal - Alerting and Notification Systems&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 19:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/000042-failed-to-create-the-address-locator-failed/m-p/401581#M10722</guid>
      <dc:creator>MarioSuau</dc:creator>
      <dc:date>2014-01-06T19:46:54Z</dc:date>
    </item>
  </channel>
</rss>

