Commandlinemodule Initialize Error When Importing MSP (Microsoft Project) XML File to SQLite DB.

(Doc ID 2350006.1)

Last updated on JANUARY 22, 2018

Applies to:

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

Symptoms

When attempting to import a MSP file, the following error occurs:

ERROR
-----------------------
12/6/2017 12:47:32 AM Information Exception
Prism.Modularity.ModuleInitializeException: An exception occurred while
initializing module 'CommandLineModule'.
- The exception message was: One or more errors occurred.
- The Assembly that the module was trying to be loaded from
was:Primavera.Mercury.CommandLineModule, Version=17.11.0.25840,
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.AggregateException: One or more errors occurred. --->
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: 134,47495
at Primavera.Venus.Infrastructure.Types.Entity.EntitySet'1.Attach(TEntity
anEntity, MergeOption option)
at
Primavera.Mercury.Importer.ImportService.CreateAndAddNewEntityTEntity(IVenusDa
taServiceContext targetContext, EntitySet'1 targetSet, IList'1 primaryKey,
Boolean hasSinglePrimaryKey, TEntity sourceEntity, ILoggerFacade Logger)
at
Primavera.Mercury.Importer.ImportService.ImportOneEntitySetTEntity(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>d__8.MoveNex
t()

End of stack trace from previous location where exception was
thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotific
ation(Task task)
at
Primavera.Mercury.CommandLineModule.ExecuteImportExport.<Execute>d__0.MoveNext
()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken)
at Primavera.Mercury.CommandLineModule.CommandLineModule.Initialize()
at Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)
--- End of inner exception stack trace ---
12/6/2017 12:47:32 AM Information Exception Failed to load type for module
CommandLineModule.
Error was: An exception occurred while initializing module
'CommandLineModule'.
- The exception message was: One or more errors occurred.
- The Assembly that the module was trying to be loaded from
was:Primavera.Mercury.CommandLineModule, Version=17.11.0.25840,
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. Login to P6 Pro with SQLite DB.
2. Try to import the MSP XML file with specific import template.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot import MSP file without error.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms