<?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 Re: Network Analyst Script Control Error in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114261#M1097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for the update!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jan 2018 16:10:28 GMT</pubDate>
    <dc:creator>MichaelThompson</dc:creator>
    <dc:date>2018-01-18T16:10:28Z</dc:date>
    <item>
      <title>Network Analyst Script Control Error</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114258#M1094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a complex multi-modal network dataset with some scripted evaluators defined for edges and default turns. &amp;nbsp;The route generation and evaluators work perfectly on our development ArcGIS Server 10.3.1. &amp;nbsp;However, when deployed to a hardened production server, the default turn evaluators fail miserably with the following error in the MapServer log:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.InteropServices.COMException (0x80042270): The evaluator failed to return a value. [Attribute: NoBargeToTruck, Default Turns, OID = -1, EID = -1]. &amp;nbsp;Network element evaluator error. [Script Control Error -2147352319].&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;In the Server/framework/etc/service/logs/service.log, I am seeing this Java stack trace:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err:Exception in thread "SOThread" java.lang.RuntimeException: java.lang.NoSuchFieldError: a&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err: at com.esri.arcgis.discovery.servicelib.impl.SOThread.run(SOThread.java:476)&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err:Caused by: java.lang.NoSuchFieldError: a&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err: at com.esri.arcgis.interop.StdObjRef.b(Unknown Source)&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err: at com.esri.arcgis.interop.Cleaner.releaseAllInCurrentThread(Unknown Source)&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err: at com.esri.arcgis.discovery.servicelib.impl.SOThread.b(SOThread.java:1178)&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;:ExecGroup-1488:err: at com.esri.arcgis.discovery.servicelib.impl.SOThread.run(SOThread.java:414)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I've turned off all restrictions except for one and through various trials, I have found that this works:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 13px;"&gt;Body:&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; Dim prohibit&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; prohibit = false&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Value:&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; prohibit&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;But this fails:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 13px;"&gt;Body:&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; Dim prohibit&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; prohibit = false&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; dim test&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; test = Turn.EID&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Value:&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; prohibit&lt;/SPAN&gt;

&lt;/PRE&gt;&lt;P&gt;Accessing ANY of the network elements (Turn, fromEdge, toEdge) fails with the COMException but only for default turns. &amp;nbsp;Scripts on Edges work just fine. &amp;nbsp;The Server is Windows 2008 R2 64-bit. &amp;nbsp;The network dataset is served from a file-geodatabase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114258#M1094</guid>
      <dc:creator>DavidGreene</dc:creator>
      <dc:date>2021-12-11T06:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Network Analyst Script Control Error</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114259#M1095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever figure this out? I am getting the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 23:55:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114259#M1095</guid>
      <dc:creator>MichaelThompson</dc:creator>
      <dc:date>2018-01-17T23:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Network Analyst Script Control Error</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114260#M1096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I spent a couple of weeks with Esri Technical Support to determine what the problem was.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Short answer:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You MUST install the corresponding ArcGIS Desktop (ArcMap) on the same server, but you don't need to license it.&amp;nbsp; The issue has been resolved in ArcGIS Server/Enterprise 10.5.1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Long Answer:&lt;/P&gt;&lt;P&gt;We couldn't duplicate it until I created a test VM and&amp;nbsp;ran through many iterations of installing, uninstalling, upgrading, and VM snapshotting.&amp;nbsp; I eventually found that everything works if ArcMap is installed and fails if ArcMap is uninstalled.&amp;nbsp; Apparently the ArcMap installation includes some DLLs and/or registry settings that are needed for some script/custom evaluators that the ArcGIS Server install does not include.&amp;nbsp; I tried doing some filesystem and registry comparisons before and after installs to find the differences and create a small "patch", but that was taking too much time.&amp;nbsp; For now, a full 3GB install of unnecessary 32-bit DLLs and other stuff is still needed.&amp;nbsp; They said they would respond to this thread, but I guess it fell off their radar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Answer from Esri after I identified the problem (July 20, 2017):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;1.) The defect that we identified, &lt;STRONG&gt;BUG-000101482&lt;/STRONG&gt; - A network analysis service fails to solve routes when the cost attribute uses a script evaluator with AttributeValueByName, if the server machine only has ArcGIS for Server installed, is the root cause of the issue according to my investigation. Though the synopsis seems differently titled and the attribute used is a cost attribute, the problem that occurs because of this defect happens when you use your script evaluator for ZDefaultNoTurns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resolution to this defect, which is the problem, is in 2 parts:&lt;BR /&gt;1.) Install ArcMap on the same machine as the ArcGIS Server machine, OR,&lt;BR /&gt;2.) Upgrade ArcGIS Server on the production machine to version 10.5.1.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114260#M1096</guid>
      <dc:creator>DavidGreene</dc:creator>
      <dc:date>2018-01-18T15:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Network Analyst Script Control Error</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114261#M1097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for the update!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/network-analyst-script-control-error/m-p/114261#M1097</guid>
      <dc:creator>MichaelThompson</dc:creator>
      <dc:date>2018-01-18T16:10:28Z</dc:date>
    </item>
  </channel>
</rss>

