Select to view content in your preferred language

"Error executing solve route" When returnDirections=true on Network Analyst

2866
3
04-18-2013 11:43 AM
FrancoisPelletier1
Occasional Contributor
Help !

I'm stuck on this one. We have our own Network and use the NA service to query routes and driving directions. Routes works fine as I am able to display a resulted route without problem. The issue I'm having is when I set the returnDirections property to true. This cause the above error (title) to pop and the request fails... I tried switching our network with Esri's (The one used in the interactive sample) and it works fine. What baffles me is that route and driving directions works fine on our network when using ArcGIS for desktop ???

Anybody knows what's going on ?

            RouteTask task = 
                new RouteTask("http://[serverName]/ArcGIS/rest/services/Entraves/NAServer/Route");
            task.SolveCompleted += new System.EventHandler<RouteEventArgs>(task_SolveCompleted);
            task.Failed += new System.EventHandler<TaskFailedEventArgs>(task_Failed);

            RouteParameters parameters = new RouteParameters()
            {
                Stops = _stops,
                OutSpatialReference = MyMap.SpatialReference,
                ReturnDirections = true,
                DirectionsLengthUnits = esriUnits.esriMeters,
                UseHierarchy = false
            };

            task.SolveAsync(_parametreDetour);


Request :
GET /ArcGIS/rest/services/Entraves/NAServer/Route/solve?returnBarriers=false&returnPolylineBarriers=false&returnPolygonBarriers=false&outSR=32187&stops=%7b%22features%22%3a%5b%7b%22attributes%22%3a%7b%22CurbApproach%22%3a2%7d%2c%22geometry%22%3a%7b%22x%22%3a236496%2c%22y%22%3a5178269%2c%22spatialReference%22%3a%7b%22wkid%22%3a32187%7d%7d%7d%2c%7b%22attributes%22%3a%7b%22CurbApproach%22%3a2%7d%2c%22geometry%22%3a%7b%22x%22%3a237764%2c%22y%22%3a5179994%2c%22spatialReference%22%3a%7b%22wkid%22%3a32187%7d%7d%7d%5d%7d&returnDirections=true&returnRoutes=true&returnStops=false&ignoreInvalidLocations=true&preserveFirstStop=true&preserveLastStop=true&useTimeWindows=false&useHierarchy=false&directionsLengthUnits=esriNAUMeters&f=json& HTTP/1.1

Response :
{"error":{"code":500,"message":"Error executing solve route","details":[]}}

ArcGIS server manager logs:
SEVERE 18 avr. 2013 15:33:28 NALayer [Route]: Could not allocate enough contiguous memory. Entraves.MapServer
SEVERE 18 avr. 2013 15:33:22 Instance of the service 'Entraves.MapServer' crashed. Server
0 Kudos
3 Replies
KjetilRøed
New Contributor
I'm having the same issue. Using ArcGIS for Server 10.1 SP1 on Windows Server 2012.

Were you able to resolve your issue?
0 Kudos
OttarViken_Valvåg
Regular Contributor
My apologies, I posted that being logged in as the wrong user, the above was actually posted by me.
I'm going to repost this issue in the ArcGIS Server forum though.
0 Kudos
FrancoisPelletier1
Occasional Contributor
Hi Valvag,

Turns out the issue seemed to be related to our language localisation. We needed directions in french and so our network was in french. We ended up replacing the resource file in the Network Analyst folder on our ArcGIS server with one from another project (with directions working). We also created an "fr" subfolder (still in the NA folder) and copied the resource file.

Not sure exactly wich of these two operations (or both ?) resolved the issue but it has been working as expected from this moment.

Hope this helps
0 Kudos