APOLLO & ECW/JP2 Discussions

Wondering how others have configured their ERDAS APOLLO server or what data they are crawling? The ERDAS APOLLO Discussion board is a place to find information, share ideas and more. Join the community, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Posts: 20
Registered: ‎03-16-2020

An item with same key has already been added erdas apollo portal error

Dear Team,


I am getting following error while adding Public accessible WMS in the apollo Geospatial Portal. error message: "An item with same key has already been added"


WMS Link:



Software products installed in the Machine.

GeoMedia WebMap 2018 - Version: 16.5.0200.00016

ERDAS APOLLO 2018 - Version:

ERDAS Apollo Data Manager – version – 16.5.1.Build37

Geospatial SDI 2018 - Version: 16.5.0200.00014

Geospatial Licensing Administrator 2018

GeoMedia Desktop 2018 - version: 16.5.0 Build 4108


Find the attached screenshot of error for your reference. Thanks in advance for your solution.







Technical Evangelist
Posts: 1,011
Registered: ‎07-30-2015

Re: An item with same key has already been added erdas apollo portal error

[ Edited ]

I can see this issue in my Apollo 2020 update 1 portal, same error when add WMS.


I tried Gaia, and Gaia could not list all images in this WMS.

Also tried ERDAS IMAGINE, IMAGINE can populate list of images in the WMS, and rendering is also working.


Please file a support ticket.






Posts: 20
Registered: ‎03-16-2020

Re: An item with same key has already been added erdas apollo portal error

Hi Haiyan, 


Thanks for the Reply.




Technical Evangelist
Posts: 1,424
Registered: ‎09-11-2015

Re: An item with same key has already been added erdas apollo portal error

The Portal log says the following:

ERROR Intergraph.WebSolutions.Core.WebClient.Platform.MapServices.MapServiceManagerHandler [(null)] - Processing ended with exception.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Intergraph.WebSolutions.Core.WebClient.Platform.Serialization.MapServiceSerializer.GetLegendItemDefaultPrioritiesStubs(LegendDefinition legendDefinition, IEnumerable`1 legendItemDefinitions)


Which means it failed during loading legend entries - in particular legend entry names are retrieved and being stored into a dictionary object. The exception says that it found same WMS legend entry name.


Here's a simple way how to find the duplicate using Notepad++ (XMLTools plug-in required):

  1. Do XPath for all the Layer Names - /WMS_Capabilities/Capability/Layer/Layer/Name
  2. XMLTools > Evaluate XPath Expression... copy the results
  3. Using Find/Replace remove the Node... and Name...
  4. Do Find and use following regular expression (source)
  5. Following Layer name should be found -> disaster:AM_LS

As per the OGC - the Name element, although generally considered a unique identifier, can have same values across the Capabilities document. But for obvious reasons, this is not a good practice. Portal was developed in order to disallow duplicate layer Names because the consequent GetMap requests could be ambiguous.


Portal currently doesn't allow duplicate layer names as it was designed like that.


You can work around the issue by removing one of the duplicate layers. To do so on the client side:
1) Save the Capabilities XML into an IIS folder on your server.
2) Edit the file and remove one of the Layers named 'disaster:AM_LS'.
3) Register your local XML version in Portal.






Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial