Profile MetaDataException

on Friday, July 17, 2009

If you get an error of the following type:


An exception of type 'Microsoft.Commerce.Providers.Metadata.MetadataException'
occurred and was
caught.
---------------------------------------------------------------------------
07/17/2009
10:46:57
Type : Microsoft.Commerce.Providers.Metadata.MetadataException,
Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
Message : Commerce Server class
'Microsoft.CommerceServer.Runtime.Profiles.Profile' or its definition 'Something'
is not found in the Commerce Server metadata.
Source :
Microsoft.Commerce.Providers
Help link :
Data :
System.Collections.ListDictionaryInternal
TargetSite :
Microsoft.Commerce.Providers.Metadata.CommerceServerEntity
GetCommerceServerEntity(System.String, System.String)
Stack Trace : at
Microsoft.Commerce.Providers.Metadata.MergedMetadata.GetCommerceServerEntity(String
commerceClassName, String commerceDefinitionName)
at
Microsoft.Commerce.Providers.Metadata.MergedMetadata.CreateMergedMetadata(CommerceEntityDelta
repository–°ommerceEntityDelta, EntityMappingDelta repositoryEntityMapping)
at
Microsoft.Commerce.Providers.Metadata.MergedMetadata.MergeMetadata(InheritableCollection`1
repositoryMetadata, MetadataCollection`1 commerceServerMetadata)
at
Microsoft.Commerce.Providers.Metadata.MergedMetadataLoader.GetMergedMetadata(String
siteChannelKey, OperationCacheDictionary operationCache)
at
Microsoft.Commerce.Providers.Metadata.MergedMetadataLoader.ExecuteQuery(CommerceQueryOperation
queryOperation, OperationCacheDictionary operationCache,
CommerceQueryOperationResponse response)
at
Microsoft.Commerce.Providers.Components.OperationSequenceComponent.Execute(CommerceOperation
operation, OperationCacheDictionary operationCache, CommerceOperationResponse
response)
at
Microsoft.Commerce.Broker.OperationSequence.ExecuteComponentTree(List`1
executionTreeList, CommerceOperation operation, OperationCacheDictionary
operationCache, CommerceOperationResponse response)
at
Microsoft.Commerce.Broker.OperationSequence.Execute(CommerceOperation
operation)
at Microsoft.Commerce.Broker.MessageHandler.ProcessMessage(String
messageHandlerName, CommerceOperation operation)
at
Microsoft.Commerce.Broker.OperationService.InternalProcessRequest(CommerceRequest
request)
at
Microsoft.Commerce.Providers.Utility.CommerceEntityMetadata.ExecuteMetadataQuery(MetadataCacheKey
cacheKey, String modelName)
at
Microsoft.Commerce.Application.Common.CachedFactory`2.GetOrCreate(TKey key,
CreateInstance`2 factory)
at
Microsoft.Commerce.Providers.Utility.CommerceEntityMetadata.Get(String
modelName, Nullable`1 commerceArea)
at
Microsoft.Commerce.Providers.Utility.ProfileMetadata.<>c__DisplayClass5.b__4(MetadataCacheKey
key)
at
Microsoft.Commerce.Application.Common.CachedFactory`2.GetOrCreate(TKey key,
CreateInstance`2 factory)
at
Microsoft.Commerce.Providers.Utility.ProfileMetadata.Get(String modelName)
at
Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.get_Metadata()
at
Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.AreSearchParametersValid(CommercePropertyCollection
properties)
at
Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.ValidateSearchCriteria(CommerceModelSearch
searchCriteria)
at
Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.GetMatches(CommerceModelSearch
searchCriteria, Nullable`1& totalItemCount, Boolean throwIfNotFound)
at
Microsoft.Commerce.Providers.Components.ProfileLoaderBase.ExecuteQuery(CommerceQueryOperation
queryOperation, OperationCacheDictionary operationCache,
CommerceQueryOperationResponse response)
at
Microsoft.Commerce.Providers.Components.OperationSequenceComponent.Execute(CommerceOperation
operation, OperationCacheDictionary operationCache, CommerceOperationResponse
response)
at
Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.Execute(CommerceOperation
operation, OperationCacheDictionary operationCache, CommerceOperationResponse
response)
at
Microsoft.Commerce.Broker.OperationSequence.ExecuteComponentTree(List`1
executionTreeList, CommerceOperation operation, OperationCacheDictionary
operationCache, CommerceOperationResponse response)
at
Microsoft.Commerce.Broker.OperationSequence.Execute(CommerceOperation
operation)
at Microsoft.Commerce.Broker.MessageHandler.ProcessMessage(String
messageHandlerName, CommerceOperation operation)
at
Microsoft.Commerce.Broker.OperationService.InternalProcessRequest(CommerceRequest
request)
at
Microsoft.Commerce.Broker.OperationService.ProcessRequest(CommerceRequest
request)
A couple of things you may want to check are:

1. Make sure the entity definition inside MetaDataDefinitions.xml is correct.
3. Verify the entries into the Channel Config.
2. If you have extended the Profile entity make sure that the changes you have made to the Profile Schema don't have any name mismatches. So open up Commerce Server Manager and make sure that the Profile Definition and the Data Object is named appropriately.

0 comments: