Showing results for 
Search instead for 
Do you mean 

[Workaround]Apollo Portal Feature-Info throw error when attribute column name starts with number

by Technical Evangelist ‎02-10-2020 02:52 PM - edited ‎02-10-2020 02:54 PM (30 Views)

When shapefile attribute column name starts with number (e.g., "2016_attribute"). Apollo shapefile crawler will crawl the shapefile, but Apollo portal feature-info tool will populate the following error:


"An unexpected error occurred. Original message: Name cannot begin with the '2' character, hexadecimal value 0x32"




[Workaround 1]

User could change their attribute column name from "2016_attribute" to "attribute_2016",


[Workaround 2]

user can modify Apollo catalog table (without modifying shapefile iteslf)


The catalog_item_attribute_defn table in the APOLLO catalog database defines the attributes that Apollo discover on vector data sources, and has three values for the attribute names: attribute_name, attribute_ogc_name, and attribute_display_name.

Attribute_ogc_name and attribute_display_name are used at runtime in the WMS service for the GetFeatureInfo operation. Attribute_ogc_name must continue to be the real attribute name, but attribute_display_name can be changed to something that is a valid XML NCName. For example changing "2016_attribute" to "u2016_attribute" results in a working system that provides the following GetFeatureInfo result:


<?xml version="1.0" encoding="utf-8"?>
<FeatureCollection xmlns="" xmlns:gml="" xmlns:xlink="" xmlns:xsi="">
<Layer Name="MRCOG_2016_TileIndex">
<Attribute Name="ORIG_FID">5340</Attribute>
<Attribute Name="PrimaryKey">5387</Attribute>
<Attribute Name="TILE">M17_SE</Attribute>
<Attribute Name="u2016_attribute">BB35_NW</Attribute>
<Attribute Name="ALT_NAME">T10NR03E35_SE</Attribute>


After the modification, user will need to restart APOLLO Tomcat and IIS services to make sure all caches are cleared etc.