laptop and a wrench

Error

ArcGIS Server 10.0 SP4 SDK MapServer.clearLayers() somehow clears everything in the context so that if method is called like mapServer.refreshServerObjects the following exception is returned. "AutomationException: A request to obtain a free servercontext has failed because the wait timeout interval has lapsed." It only happens when you clear the layers from the default map. There is no delay. It immediately puts out the error. Clearing the layers shouldn't force an automation exception with refresh server objects because the layers are associated to the default map. There could be other maps associated with that map server. If you individually delete each layer from the map it works great. Its the clearLayers that is doing something to the underlying context.

Última publicación: August 25, 2014 ArcGIS Server (.NET)
Número de ID del error NIM089595
EnviadoMarch 7, 2013
Última modificaciónJune 5, 2024
Relacionado conArcGIS Server (.NET)
Versión encontrada10.0.4
Lenguaje del programaJava
EstadoNon-Reproducible

Información adicional

No Public Explanation

Solución alternativa

Replace // map.clearLayers();with Stack<ILayer> iLayers = new Stack<ILayer>(); for (int i = 0; i < map.getLayerCount(); ++i) { iLayers.push(map.getLayer(i)); } while (!iLayers.empty()) { map.deleteLayer(iLayers.pop()); }

Pasos para reproducir

ID del error: NIM089595

Software:

  • ArcGIS Server (.NET)

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga