By default, Infrastructure Map Server silently suppresses any errors which occur when rendering a layer. So to help debug any errors which occur when it is rendering a layer, turn on warning level logging so that warnings are logged to both the error log and the trace log.
[GeneralProperties] LogsDetail = MappingService:1,FeatureService:1, RenderingService:1
The warning message alone will not provide enough detail to determine which layer is causing problems:
<2008-07-17T14:57:29> 2364 Anonymous Warning: An exception occurred in FDO component. Geometry property value encountered! StackTrace: - MgStylizationUtil.ExceptionTrap() line 199 file .\GeometryAdapter.cpp An exception occurred in FDO component.
The trace log can then be turned on to provide sufficient detail. The available detail level depends on the service. Most services can return level 2 detail. Mapping Service can return level 3 detail. The MgStylizationUtil.StylizerLayers trace entry is level 3 detail for Mapping Service.
To return level 3 detail for the Mapping Service and level 2 detail for the Feature and Rendering Service, the LogsDetail parameter can be set as follows:
[GeneralProperties] LogsDetail = MappingService:3,FeatureService:2, RenderingService:2
This results in:
<2008-07-17T14:57:29> 2364 BGN MgStylizationUtil.StylizeLayers Map=Sheboygan,LayerId=Library://Samples/Sheboygan/Layers/ CityLimits.LayerDefinition <2008-07-17T14:57:29> 1544 MgClientHandler::Initialize() - Address: 27.0.0.1:2812 <2008-07-17T14:57:29> 1544 MgClientHandler::Initialize() - Address: 27.0.0.1:2811 <2008-07-17T14:57:29> 2300 MgServerMappingService::GenerateLegendImage <2008-07-17T14:57:29> 2364 BGN MgServerFeatureService.GetSpatialContexts Id=Library://Samples/Sheboygan/Data/ CityLimits.FeatureSource,ActiveOnly=0 <2008-07-17T14:57:29> 2364 END MgServerFeatureService.GetSpatialContexts <2008-07-17T14:57:29> 2364 BGN MgServerFeatureService.SelectFeatures Resource=Library://Samples/Sheboygan/Data/ CityLimits.FeatureSource,ClassName=SHP_Schema:CityLimits, Options={{Operator=1}{GeomProp=SHPGEOM} {GeomOp=EnvelopeIntersects}{Geometry=POLYGON ((-87.780335659913959 43.691398128787803, -87.680172841948519 43.691398128787803, -87.680172841948519 43.797520000480297, -87.780335659913959 43.797520000480297, -87.780335659913959 43.691398128787803))}} <2008-07-17T14:57:29> 2364 END MgServerFeatureService.SelectFeatures <2008-07-17T14:57:29> 2364 Warning: An exception occurred in FDO component. Geometry property value encountered! <2008-07-17T14:57:29> 2364 END MgStylizationUtil.StylizeLayers
From the error log, the warning message was generated on thread 2364. Using the timestamp and the thread identifier the call stack can be traced using the trace log. Starting at the warning statement in the trace log, thread 2364 can be backtraced through the MgServerFeatureService.SelectFeatures call and into the MgStylizationUtil.StylizeLayers call. The BGN/END statements show operation nesting for each thread. By using Excel or a text editor, the other threads can be removed from the log.
<2008-07-17T14:57:29> 2364BGNMgStylizationUtil.StylizeLayers Map=Sheboygan,LayerId=Library://Samples/Sheboygan/Layers/ CityLimits.LayerDefinition <2008-07-17T14:57:29> 2364 BGN MgServerFeatureService.GetSpatialContexts Id=Library://Samples/Sheboygan/Data/ CityLimits.FeatureSource,ActiveOnly=0 <2008-07-17T14:57:29> 2364 END MgServerFeatureService.GetSpatialContexts <2008-07-17T14:57:29> 2364 BGN MgServerFeatureService.SelectFeatures Resource=Library://Samples/Sheboygan/Data/ CityLimits.FeatureSource,ClassName=SHP_Schema:CityLimits, Options={{Operator=1}{GeomProp=SHPGEOM} {GeomOp=EnvelopeIntersects}{Geometry=POLYGON ((-87.780335659913959 43.691398128787803, -87.680172841948519 43.691398128787803, -87.680172841948519 43.797520000480297, -87.780335659913959 43.797520000480297, -87.780335659913959 43.691398128787803))}} <2008-07-17T14:57:29> 2364 END MgServerFeatureService.SelectFeatures <2008-07-17T14:57:29> 2364 Warning: An exception occurred in FDO component. Geometry property value encountered! <2008-07-17T14:57:29> 2364ENDMgStylizationUtil.StylizeLayers
The FDO exception is emitted immediately after the SelectFeatures call. This is logical because SelectFeatures returns an MgFeatureReader and the first ReadNext() executed by the stylizer causes the error to occur.
From the log, the warning message occurs between the BGN/END blocks of StylizeLayers. This means the CityLimits layer definition is the layer causing the error. This allows the you to concentrate your effort on a single layer instead of walking through every layer in a map.