archanasahu

Exception thrown running web application (...NA Route Layer not available)

Discussion created by archanasahu on Dec 4, 2011
Latest reply on Dec 6, 2011 by dkudinov-esristaff
I have published one map service with network dataset of an university campus (dataset being created by one desktop developer) with network analysis capability on Advanced ArcGIS java server 10.0 (we have network server license too). I have published an address locator as geocode service too. Routing (finding direction and all) works fine inside ArcMap. But, while trying following sample (consuming this service programmatically), I am getting errors mentioned below.
http://edndoc.esri.com/arcobjects/9.2/Java/java/server/web_adf/tasks/custom_routing_tasks.html
But the same sample works fine with San-Francisco data that comes with the developer-kit. I am fairly new to arcgis java server web application development.
 
I am really desperate to find out what could be the possible reasons for getting following errors as I have no idea about creating network dataset and have been provided by somebody who also has no idea why it doesn't work on server whereas it works fine inside ArcMap. Please, can somebody throw some light?

I tried asking the same question on ArcGIS-Server -Java forum too, but didn't get any reply. So, I am hoping somebody from this forum will able to help me.
http://forums.arcgis.com/threads/44772-Getting-exception-in-custom-routing-task


........................................................................................................................
SEVERE: Unable to initialize functionality : networkAnalyst. This functionality will be removed from this resource: IITBRoadNetwork
com.esri.adf.web.ags.ADFAGSException: Unable to initialize AGSNAFunctionality. Unable to get the NA Layer name.
at com.esri.adf.web.ags.data.AGSNAFunctionality.initFunctionality(AGSNAFunctionality.java:140)
at com.esri.adf.web.data.GISResource.init(GISResource.java:237)
at com.esri.adf.web.ags.data.AGSMapResource.init(AGSMapResource.java:219)
at com.esri.adf.web.ags.data.AGSLocalMapResource.init(AGSLocalMapResource.java:145)
at com.esri.adf.web.ags.data.AGSLocalExtensionsResource.init(AGSLocalExtensionsResource.java:53)
at com.esri.adf.web.data.WebContext$0.run(WebContext$0.java:590)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.Executors$PrivilegedCallable$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors$PrivilegedCallable.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.esri.adf.web.ags.ADFAGSException: NA Route Layer not available with the associated resource.
at com.esri.adf.web.ags.data.AGSNAFunctionality.initFunctionality(AGSNAFunctionality.java:137)
... 14 more
-------------------------------------------------------

Thanks,

Archana

Outcomes