My Oracle Support Banner

Cannot Export Microsoft Project XML Files in P6 Professional, Error: "An Exception Occurred While Initializing Module 'CommandLineModule'. The Exception Message Was: The Given Key Was Not Present in the Dictionary." (Doc ID 2169879.1)

Last updated on NOVEMBER 16, 2023

Applies to:

Primavera P6 Professional Project Management - Version 16.1.0.0 and later
Information in this document applies to any platform.

Symptoms

When attempting to Export a Project via Microsoft Project (MSP) XML Project, the following error occurs:

ERROR
-----------------------
Prism.Modularity.ModuleInitializeException: An exception occurred while initializing module 'CommandLineModule'.
  - The exception message was: The given key was not present in the dictionary.
  - The Assembly that the module was trying to be loaded from was:Primavera.Mercury.CommandLineModule, Version=16.1.0.18077, Culture=neutral, PublicKeyToken=null
  Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
  ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
  at Primavera.Domain.Base.Calendar.CreateExceptionDaysFromData(String data)
  at Primavera.Domain.Base.Calendar.get_ExceptionDays()
  at Primavera.Venus.Data.FileStore.ApiXmlCalendarDataExport.ExportCalendarData(Calendar calendar, XmlElement CalNode)
  at Primavera.Venus.Data.FileStore.ApiXmlExtraObjects.HandleExtraObjects(Entity anEntity, XmlElement aNode)
  at Primavera.Venus.Data.FileStore.ApiXmlProjectExporter.ExportOneEntity(Entity anEntity, IEntityMetadata metaData, XmlElement root, WBS rootwbs)
  at Primavera.Venus.Data.FileStore.ApiXmlProjectExporter.DoExport(XmlDocument doc)
  at Primavera.Venus.Data.FileStore.ApiXmlProjectExporter.Export(EntityContext anEntityContext, IApiXmlCommitOptions anExportConfig, String FileName)
  at Primavera.Mercury.CommandLineModule.ExecuteImportExport.DoExport(IMercuryCommandLine commandLine)
  at Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)
  --- End of inner exception stack trace ---
Failed to load type for module CommandLineModule.
Error was: An exception occurred while initializing module 'CommandLineModule'.
  - The exception message was: The given key was not present in the dictionary.
  - The Assembly that the module was trying to be loaded from was:Primavera.Mercury.CommandLineModule, Version=16.1.0.18077, Culture=neutral, PublicKeyToken=null
  Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
  
STEPS
-----------------------
The issue can be reproduced at will with the following steps:

  1. Log in to P6 SQLite database.
  2. Open Project.
  3. Select file, Export to MS Project XML format and step through Export wizard.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
 Cause 1:
 Cause 2:
Solution
 Solution for Cause 1:
 Solution for Cause 2:
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.