Modeling Gateway import fails with "Model AdiscConfig was parsed as two different classes"
search cancel

Modeling Gateway import fails with "Model AdiscConfig was parsed as two different classes"

book

Article ID: 437390

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

When attempting to import a Spectrum export file using the Modeling Gateway toolkit, the process fails during the parsing stage with a java.lang.Throwable: Model AdiscConfig:Swindon was parsed as two different classes: com.aprisma.tie.parse.DiscoveryElement exception.

Example Error Output:

text
Parsing import file /usr/Spectrum/SpectrumExport_2026.xml
Modeling Gateway import exception:
java.lang.Throwable: Model AdiscConfig:Swindon was parsed as two different classes: com.aprisma.tie.parse.DiscoveryElement com.aprisma.tie.parse.ModelElement
        at com.aprisma.tie.parse.FileElement.checkAndMerge(FileElement.java:291)
        at com.aprisma.tie.parse.ModuleElement.parseChildren(ModuleElement.java:342)
        at com.aprisma.tie.parse.ModuleElement.parseModule(ModuleElement.java:227)
        at com.aprisma.tie.parse.FileElement.parse(FileElement.java:666)
        at com.aprisma.tie.parse.FileElement.parseXmlFile(FileElement.java:375)
        at com.aprisma.tie.parse.FileElement.<init>(FileElement.java:118)
        at com.aprisma.tie.imprt.MgImportMain.startImport(MgImportMain.java:89)
        at com.aprisma.tie.ModelingGateway.performAction(ModelingGateway.java:305)
        at com.aprisma.tie.ModelingGatewayMain.main(ModelingGatewayMain.java:152)

Environment

  • Version: Spectrum 24.3.x and above
  • Scenario: Exporting from one SpectroSERVER and importing to another on the same version in Legacy Landscape

Cause

The error occurs because the Modeling Gateway parser is configured to handle "huge landscape" imports, which changes how certain discovery and model elements are processed. When this mode is active on a landscape that does not require it or has conflicting model definitions, the parser may misidentify a model (such as AdiscConfig) as two distinct element classes simultaneously, leading to the java.lang.Throwable exception modelinggateway throws error when importing.

Resolution

To resolve this issue, disable the huge_landscape_import parameter on the target SpectroSERVER:

  1. Log in to the target SpectroSERVER as the user that owns the Spectrum installation.
  2. Navigate to the $SPECROOT/SS-Tools/ directory.
  3. Open the file .modelinggatewayresource.xml in a text editor.
  4. Locate the following line: huge_landscape_import = "true"
  5. Change the value to falsehuge_landscape_import = "false"
  6. Save and close the file.
  7. Execute the Modeling Gateway import command again: ./modelinggateway -vnm [HOSTNAME] -i [IMPORT_FILE].xml

The import should now proceed through the parsing stage and correctly create or update the models.