My Oracle Support Banner

Error: "An Exception Occurred While Initializing Module 'CommandLineModule'" During Microsoft Project (MSP) Import in P6 Professional (Doc ID 2198258.1)

Last updated on SEPTEMBER 19, 2024

Applies to:

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

Symptoms

A Microsoft Project XML (MSP XML) import will generate the error below:

"Process completed with errors. See log file for details."
  Currency: 1 matched, 1 not imported.
  ResourceCurve: 12 matched, 12 not imported.
 UserDefinedField: 4 matched, 4 not imported.
  Project: 1 created.
  Calendar: 3 created.
  WBS: 32 created.
  Activity: 268 created.
  ActivityRelationship: 462 created.
Prism.Modularity.ModuleInitializeException: An exception occurred while initializing module 'CommandLineModule'.
  - The exception message was: Exception has been thrown by the target of an invocation.
  - 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.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Cannot attach an already existing entity Primavera.Domain.Base.UserDefinedFieldValue: Key: 128,60620
  at Primavera.Venus.Infrastructure.Types.Entity.EntitySet`1.Attach(TEntity anEntity, MergeOption option)
  at Primavera.Mercury.Importer.ImportService.CreateAndAddNewEntity[TEntity](IVenusDataServiceContext targetContext, EntitySet`1 targetSet, IList`1 primaryKey, Boolean hasSinglePrimaryKey, TEntity sourceEntity, ILoggerFacade Logger)
  at Primavera.Mercury.Importer.ImportService.ImportOneEntitySet[TEntity](EntitySet`1 source, IVenusDataServiceContext targetContext, ImportOptionsList options, ImportProjectSettings importProjectSettings, ILoggerFacade Logger)
  --- End of inner exception stack trace ---
  at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  at Primavera.Mercury.Importer.ImportService.ExecuteImport(EntityContext sourceContext, IVenusDataServiceContext targetContext, ImportOptionsList options, ImportProjectSettings importProjectSettings, ILoggerFacade Logger, Dictionary`2 initialKeyDictionary)
  at Primavera.Mercury.CommandLineModule.ExecuteImportExport.DoImport()
  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: Exception has been thrown by the target of an invocation.
  - 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. Save a file in MS Project with an .XML format.
  2. Import the file into P6 Professional.
  3. Notice the error.

BUSINESS IMPACT
-----------------------
Due to this issue, users cannot import Microsoft Project XML files.

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
Solution
References


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