KBJust a quick heads up on a new Service Manager 2010 Knowledge Base article we published today.  If you ever see errors such as An error occurred while loading the items" while working in the Service Manager console then you'll want to keep this one in mind:

=====

Symptom

While working in the Service Manager 2010 console you may intermittently receive the following error:

An error occurred while loading the items

The full error text is as follows:

Application: System Center Service Manager Console
Application Version: x.x.xxxx.x 
Severity: Error 
Message: An error occurred while loading the items. 

System.NotSupportedException: In order to use differential updates, the Update or Remove adapter need to be specified. To disable differential updates, set the FullUpdateInterval to 1 
at Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportAdapter.DoAction(DataQueryBase query, IList`1 dataSources, IDictionary`2 parameters, IList`1 inputs, String outputCollectionName) 
at Microsoft.EnterpriseManagement.UI.DataModel.QueryQueue.StartExecuteQuery(Object sender, ConsoleJobEventArgs e) 
at Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)

Cause

This issue can occur when there are views that have RemoveItemsAdapter, AppendItemsAdapter and UpdateItemsAdapter adapters defined with a FullUpdateFrequency of 1. If this value is other than 1 then it should not be a problem with the view. For example, the My Incidents view has these adapters defined but its FullUpdateFrequency is 100.

The views that cause this error have the following under view definition:

<AdvancedListSupportClass DataTypeName="" AdapterName="viewframework://Adapters/AdvancedList" FullUpdateAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" RemoveItemsAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" AppendItemsAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" UpdateItemsAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" DataSource="mom:ManagementGroup" FullUpdateFrequency="1" Streaming="true" IsRecurring="True" RecurrenceFrequency="{x:Static s:Int32.MaxValue}" xmlns="clr-namespace:Microsoft.EnterpriseManagement.UI.ViewFramework;assembly=Microsoft.EnterpriseManagement.UI.ViewFramework" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib">

The correct view definition would be as follows:

<AdvancedListSupportClass DataTypeName="" AdapterName="viewframework://Adapters/AdvancedList" FullUpdateAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" DataSource="mom:ManagementGroup" IsRecurring="True" RecurrenceFrequency="{x:Static s:Int32.MaxValue}" FullUpdateFrequency="1" Streaming="true" xmlns="clr-namespace:Microsoft.EnterpriseManagement.UI.ViewFramework;assembly=Microsoft.EnterpriseManagement.UI.ViewFramework" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib">

Note: We have fixed the code defect in Service Pack 1 for Service Manager 2010 so that this will no longer happen but views that already have this problem need to be manually fixed.

Resolution

To resolve the issue please follow the steps below:

1. In the Service Manager console, click Administration.
2. In the Administration pane, expand Administration, and then click Management Packs.
3. In the Management Packs pane, locate the management pack with name "Service Manager Incident Management Configuration Library" and select it.

Note: If you have your custom views stored in a separate management pack, then you need to take a similar approach to fix the views with incorrect definitions in those management packs.

4. In the Tasks pane, under the name of the management pack that you want to export, click Export.
5. In the Browse For Folder dialog box, select a location for the file, and then click OK.

Note: You cannot change the default name of the management pack file.

6. Before you edit the management pack file make a copy of this management pack.
7. Open the exported Management pack with your favorite text editor.
8. All the view definitions are stored under section <Views></Views>of the management pack.Locate the following element <Views> under the management pack. 
9. Now go through each view definition and if you find any view that have adapters RemoveItemsAdapter, AppendItemsAdapter and UpdateItemsAdapter defined with a FullUpdateFrequency of 1. Remove the adapters RemoveItemsAdapter, AppendItemsAdapter and UpdateItemsAdapter for those views.

Below is a sample view definition before and after the correction. You'll notice that RemoveItemsAdapter, AppendItemsAdapter and UpdateItemsAdapter are present in the incorrect view definition where as they are not present in correct view definition.

View before correction:

<View ID="System.WorkItem.Incident.AllIncidents.View" Accessibility="Public" Enabled="true" Target="CoreIncident!System.WorkItem.Incident" TypeID="SMConsole!GridViewType" Visible="true">
        <Category>NotUsed</Category>
        <Data>
          <Adapters>
            <Adapter AdapterName="dataportal:EnterpriseManagementObjectProjectionAdapter">
              <AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
              <AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.EnterpriseManagementObjectProjectionAdapter</AdapterType>
            </Adapter>
            <Adapter AdapterName="viewframework://Adapters/AdvancedList">
              <AdapterAssembly>Microsoft.EnterpriseManagement.UI.ViewFramework</AdapterAssembly>
              <AdapterType>Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportAdapter</AdapterType>
            </Adapter>
            <Adapter AdapterName="omsdk://Adapters/Criteria">
              <AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
              <AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.SdkCriteriaAdapter</AdapterType>
            </Adapter>
          </Adapters>
          <ItemsSource>
  <AdvancedListSupportClass DataTypeName="" AdapterName="viewframework://Adapters/AdvancedList" FullUpdateAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" RemoveItemsAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" AppendItemsAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" UpdateItemsAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" DataSource="mom:ManagementGroup" IsRecurring="True" RecurrenceFrequency="{x:Static s:Int32.MaxValue}" FullUpdateFrequency="1" Streaming="true" xmlns="clr-namespace:Microsoft.EnterpriseManagement.UI.ViewFramework;assembly=Microsoft.EnterpriseManagement.UI.ViewFramework" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib">
              <AdvancedListSupportClass.Parameters>
                <QueryParameter Parameter="TypeProjectionId" Value="$MPElement[Name='System.WorkItem.Incident.View.ProjectionType']$" />
              </AdvancedListSupportClass.Parameters>
            </AdvancedListSupportClass>
          </ItemsSource>
          <Criteria />
        </Data>
        <Presentation>
          <Columns>
            <mux:ColumnCollection xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mux="http://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:datebinding="clr-namespace:Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common;assembly=Microsoft.EnterpriseManagement.UI.SdkDataAccess">
              <mux:Column Name="id" DisplayMemberBinding="{Binding Path=Id, Mode=OneWay}" Width="150" DisplayName="Header_Id" Property="Id$ReturnValueAsBigInt$" DataType="s:String" />
              <mux:Column Name="title" DisplayMemberBinding="{Binding Path=Title, Mode=OneWay}" Width="200" DisplayName="Header_Title" Property="Title" DataType="s:String" />
              <mux:Column Name="aDisplayName" DisplayMemberBinding="{Binding Path=AssignedUser.DisplayName, Mode=OneWay}" Width="150" DisplayName="Header_Assigned_To" Property="AssignedUser.DisplayName" DataType="s:String" />
              <mux:Column Name="sDisplayName" DisplayMemberBinding="{Binding Path=Status.DisplayName, Mode=OneWay}" Width="100" DisplayName="Header_Status" Property="Status.DisplayName" DataType="s:String" />
              <mux:Column Name="priority" DisplayMemberBinding="{Binding Path=Priority, Mode=OneWay}" Width="100" DisplayName="Header_Priority" Property="Priority" DataType="s:Int32" />
              <mux:Column Name="targetResolutionTime" DisplayMemberBinding="{datebinding:DateBinding Path=TargetResolutionTime, Mode=OneWay}" Width="100" DisplayName="Header_Target_Resolution_Time" Property="TargetResolutionTime" DataType="s:DateTime" />
              <mux:Column Name="affectedDisplayName" DisplayMemberBinding="{Binding Path=AffectedUser.DisplayName, Mode=OneWay}" Width="150" DisplayName="Header_Affected_User" Property="AffectedUser.DisplayName" DataType="s:String" />
              <mux:Column Name="tDisplayName" DisplayMemberBinding="{Binding Path=TierQueue.DisplayName, Mode=OneWay}" Width="150" DisplayName="Header_Support_Group" Property="TierQueue.DisplayName" DataType="s:String" />
              <mux:Column Name="lastModified" DisplayMemberBinding="{Binding Path=$LastModified$, Mode=OneWay}" Width="150" DisplayName="Header_Last_Modified" Property="$LastModified$" DataType="s:DateTime" />
            </mux:ColumnCollection>
          </Columns>
          <ViewStrings>
            <ViewString ID="Header_Id">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Id"]$</ViewString>
            <ViewString ID="Header_Title">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Title"]$</ViewString>
            <ViewString ID="Header_Assigned_To">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Assigned_To"]$</ViewString>
            <ViewString ID="Header_Status">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Status"]$</ViewString>
            <ViewString ID="Header_Priority">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Priority"]$</ViewString>
            <ViewString ID="Header_Target_Resolution_Time">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Target_Resolution_Time"]$</ViewString>
            <ViewString ID="Header_Affected_User">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Affected_User"]$</ViewString>
            <ViewString ID="Header_Support_Group">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Support_Group"]$</ViewString>
            <ViewString ID="Header_Last_Modified">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Last_Modified"]$</ViewString>
          </ViewStrings>
        </Presentation>
      </View>

View after correction:

<View ID="System.WorkItem.Incident.AllIncidents.View" Accessibility="Public" Enabled="true" Target="CoreIncident!System.WorkItem.Incident" TypeID="SMConsole!GridViewType" Visible="true">
        <Category>NotUsed</Category>
        <Data>
          <Adapters>
            <Adapter AdapterName="dataportal:EnterpriseManagementObjectProjectionAdapter">
              <AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
              <AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.EnterpriseManagementObjectProjectionAdapter</AdapterType>
            </Adapter>
            <Adapter AdapterName="viewframework://Adapters/AdvancedList">
              <AdapterAssembly>Microsoft.EnterpriseManagement.UI.ViewFramework</AdapterAssembly>
              <AdapterType>Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportAdapter</AdapterType>
            </Adapter>
            <Adapter AdapterName="omsdk://Adapters/Criteria">
              <AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
              <AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.SdkCriteriaAdapter</AdapterType>
            </Adapter>
          </Adapters>
          <ItemsSource>
  <AdvancedListSupportClass DataTypeName="" AdapterName="viewframework://Adapters/AdvancedList" FullUpdateAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" DataSource="mom:ManagementGroup" IsRecurring="True" RecurrenceFrequency="{x:Static s:Int32.MaxValue}" FullUpdateFrequency="1" Streaming="true" xmlns="clr-namespace:Microsoft.EnterpriseManagement.UI.ViewFramework;assembly=Microsoft.EnterpriseManagement.UI.ViewFramework" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib">
              <AdvancedListSupportClass.Parameters>
                <QueryParameter Parameter="TypeProjectionId" Value="$MPElement[Name='System.WorkItem.Incident.View.ProjectionType']$" />
              </AdvancedListSupportClass.Parameters>
            </AdvancedListSupportClass>
          </ItemsSource>
          <Criteria />
        </Data>
        <Presentation>
          <Columns>
            <mux:ColumnCollection xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mux="http://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:datebinding="clr-namespace:Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common;assembly=Microsoft.EnterpriseManagement.UI.SdkDataAccess">
              <mux:Column Name="id" DisplayMemberBinding="{Binding Path=Id, Mode=OneWay}" Width="150" DisplayName="Header_Id" Property="Id$ReturnValueAsBigInt$" DataType="s:String" />
              <mux:Column Name="title" DisplayMemberBinding="{Binding Path=Title, Mode=OneWay}" Width="200" DisplayName="Header_Title" Property="Title" DataType="s:String" />
              <mux:Column Name="aDisplayName" DisplayMemberBinding="{Binding Path=AssignedUser.DisplayName, Mode=OneWay}" Width="150" DisplayName="Header_Assigned_To" Property="AssignedUser.DisplayName" DataType="s:String" />
              <mux:Column Name="sDisplayName" DisplayMemberBinding="{Binding Path=Status.DisplayName, Mode=OneWay}" Width="100" DisplayName="Header_Status" Property="Status.DisplayName" DataType="s:String" />
              <mux:Column Name="priority" DisplayMemberBinding="{Binding Path=Priority, Mode=OneWay}" Width="100" DisplayName="Header_Priority" Property="Priority" DataType="s:Int32" />
              <mux:Column Name="targetResolutionTime" DisplayMemberBinding="{datebinding:DateBinding Path=TargetResolutionTime, Mode=OneWay}" Width="100" DisplayName="Header_Target_Resolution_Time" Property="TargetResolutionTime" DataType="s:DateTime" />
              <mux:Column Name="affectedDisplayName" DisplayMemberBinding="{Binding Path=AffectedUser.DisplayName, Mode=OneWay}" Width="150" DisplayName="Header_Affected_User" Property="AffectedUser.DisplayName" DataType="s:String" />
              <mux:Column Name="tDisplayName" DisplayMemberBinding="{Binding Path=TierQueue.DisplayName, Mode=OneWay}" Width="150" DisplayName="Header_Support_Group" Property="TierQueue.DisplayName" DataType="s:String" />
              <mux:Column Name="lastModified" DisplayMemberBinding="{Binding Path=$LastModified$, Mode=OneWay}" Width="150" DisplayName="Header_Last_Modified" Property="$LastModified$" DataType="s:DateTime" />
            </mux:ColumnCollection>
          </Columns>
          <ViewStrings>
            <ViewString ID="Header_Id">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Id"]$</ViewString>
            <ViewString ID="Header_Title">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Title"]$</ViewString>
            <ViewString ID="Header_Assigned_To">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Assigned_To"]$</ViewString>
            <ViewString ID="Header_Status">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Status"]$</ViewString>
            <ViewString ID="Header_Priority">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Priority"]$</ViewString>
            <ViewString ID="Header_Target_Resolution_Time">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Target_Resolution_Time"]$</ViewString>
            <ViewString ID="Header_Affected_User">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Affected_User"]$</ViewString>
            <ViewString ID="Header_Support_Group">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Support_Group"]$</ViewString>
            <ViewString ID="Header_Last_Modified">$MPElement[Name="System.WorkItem.Incident.AllIncidents.View.Header_Last_Modified"]$</ViewString>
          </ViewStrings>
        </Presentation>
      </View>

10. Save the Management Pack file.
11. In the Service Manager console, click Administration.
12. In the Administration pane, expand Administration, and then click Management Packs.
13. In the Tasks pane, under Management Packs, click Import.
14. In the Select Management Packs to Import dialog box, select the modified management pack file, and then click Open.
15. In the Import Management Packs dialog box, click Add. 
16. After you have added the management pack, click Import, and then click OK

=====

For the latest version of this article see the link below:

KB2477329 - Improperly configured views in the Service Manager 2010 console generate the error "An error occurred while loading the items"

J.C. Hornbeck | System Center Knowledge Engineer

The App-V Team blog: http://blogs.technet.com/appv/
The WSUS Support Team blog: http://blogs.technet.com/sus/
The SCMDM Support Team blog: http://blogs.technet.com/mdm/
The ConfigMgr Support Team blog: http://blogs.technet.com/configurationmgr/
The SCOM 2007 Support Team blog: http://blogs.technet.com/operationsmgr/
The SCVMM Team blog: http://blogs.technet.com/scvmm/
The MED-V Team blog: http://blogs.technet.com/medv/
The DPM Team blog: http://blogs.technet.com/dpm/
The OOB Support Team blog: http://blogs.technet.com/oob/
The Opalis Team blog: http://blogs.technet.com/opalis

clip_image001 clip_image002