Opening Exchange Connector Crashes Console

This just started this morning, but whenever I try to open an Exchange Connector, the console crashes with a ArgumentNullException.  Tried to open the connectors on another computer and using the console on the Management Server and they both crash.  I can start to create a new exchange connector but the console crashes when I click on Routing and Scheduling.  I think I know the cause but I wanted to get some feedback before I go digging around in the Linking Configuration management pack. 

Here's what I think caused this.  This weekend, I had to delete a custom CI class MP so I could seal the MP and re-import the management pack.  I wanted the class instances and relationships to be stored in the DW.  I discovered yesterday that this also broke several SR templates that had references to the aforementioned deleted custom CI class.  Since the MP that held the broken templates still contained the deleted class reference, I couldn't even edit the templates in the console and had to export the MP to delete those templates manually.  After importing the fixed MP I was able to recreate the necessary templates and set the exchange connector template targets accordingly.  Now I find that I am unable to open or edit any exchange connector.

What I think will fix this.  I do believe that I can export the Linking Configuration MP and delete the references to the templates that I manually deleted yesterday.  Can I fix it this way?  Will exporting and re-importing the Linking Configuration MP cause any side-effects?

Here is a copy of the console crash error from the Ops Mgr log.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.SortedDictionary`2.ContainsKey(TKey key)
   at Microsoft.SystemCenter.ExchangeConnector.ExchangeConnectorWizardDataLists.GetTemplateList(String[] stringClassNames, EnterpriseManagementGroup emg)
   at Microsoft.SystemCenter.ExchangeConnector.ExchangeConnectorRoutingandSchedulePage..ctor(WizardData wizardData)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Microsoft.EnterpriseManagement.UI.WpfWizardFramework.WizardStep.RecreateUI(Boolean forceRecreate)
   at Microsoft.EnterpriseManagement.UI.WpfWizardFramework.WizardStep.get_UI()
   at Microsoft.EnterpriseManagement.UI.WpfWizardFramework.PropertySheetDialogBase.SaveCommandBinding_CanExecute(Object sender, CanExecuteRoutedEventArgs e)
   at System.Windows.Input.CommandBinding.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e)
   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.RoutedCommand.CanExecuteImpl(Object parameter, IInputElement target, Boolean trusted, Boolean& continueRouting)
   at System.Windows.Input.RoutedCommand.CanExecute(Object parameter, IInputElement target)
   at MS.Internal.Commands.CommandHelpers.CanExecuteCommandSource(ICommandSource commandSource)
   at System.Windows.Controls.Primitives.ButtonBase.OnCanExecuteChanged(Object sender, EventArgs e)
   at System.Windows.Input.CommandManager.CallWeakReferenceHandlers(List`1 handlers)
   at System.Windows.Input.CommandManager.RaiseRequerySuggested(Object obj)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
   at Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common.ErrorHandler.<>c__DisplayClasse.<ShowErrorDialog>b__b(Object sender, EventArgs arg)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
   at Microsoft.EnterpriseManagement.ConsoleFramework.WindowManager.GenericWpfWindowConstructor.BeginShow(ShowViewContext showViewContext, Object parent, Object view, AsyncCallback callback, Object state)
   at Microsoft.EnterpriseManagement.ConsoleFramework.ViewConstructor.BeginShow(ShowViewContext showViewContext, AsyncCallback callback, Object state)
   at Microsoft.EnterpriseManagement.ConsoleFramework.WindowManager.WpfWindowRecord.ShowWindow()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunInternal(Window window)
   at Microsoft.EnterpriseManagement.ConsoleFramework.ConsoleApplication.LaunchWindow()
   at Microsoft.EnterpriseManagement.ConsoleFramework.ConsoleApplication.Run()
   at Microsoft.EnterpriseManagement.ServiceManager.UI.Console.Program.Main()

I ran this SQL against the CMDB and I do indeed see that the NewWorkItemTemplate field has a value while the corresponding ObjectTemplateId is NULL

select bme.DisplayName, ec.BaseManagedEntityId, 
  ec.NewWorkItemTemplate_6DB5E48D_0A26_473F_6012_1B7A6A149935, 
  ot.ObjectTemplateId, ot.ManagementPackId
from dbo.MT_ExchangeConnector as ec
inner join dbo.BaseManagedEntity as bme
  on ec.BaseManagedEntityId = bme.BaseManagedEntityId
left outer join dbo.ObjectTemplate as ot
  on ec.NewWorkItemTemplate_6DB5E48D_0A26_473F_6012_1B7A6A149935 
  = ot.ObjectTemplateName
order by bme.DisplayName

  • Edited by Foothill1 Wednesday, September 02, 2015 3:57 PM
September 2nd, 2015 3:42pm

Turns out that my initial assessment was correct.  Deleting the unsealed management pack containing the custom configuration item was the culprit.  It left behind remnants of the class in several work item templates.  When you try to open an Exchange Connector it loads all your templates and since there were templates referencing a non-existent configuration item type, it crashed right there.

What it took to fix this was deleting all the existing Exchange Connectors and the management pack (I needed to upgrade to 3.1 connectors anyways).  I then had to go through and open and save each and every template so that any broken references were removed.  After that, I was able to rebuild all my exchange connectors.

  • Marked as answer by Foothill1 Thursday, September 10, 2015 1:46 PM
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 1:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics