Try our conversational search powered by Generative AI!

Initialization exception: Meta field already exists

Vote:
 

Hi,

Few days ago we updated EPiServer together with EPiServer Commerce. We also have EPiServer Commerce Manager nuget installed in EPiServer CMS.

From time to time when cms application starts the exeption is thrown. When I refresh the page everything is working - so it's looks like an initialization exception.

We are using CMS and Commerce since EPiServer 6R2, so it could be some obsolete web.config setting that should be changed or removed. Do you have any idea what could it be?

Meta field already exists.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Mediachase.BusinessFoundation.Data.Meta.Management.MetaFieldAlreadyExistsException: Meta field already exists.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

Below is exception and stack trace:


[MetaFieldAlreadyExistsException: Meta field already exists.]
Mediachase.BusinessFoundation.Data.Meta.Management.MetaClass.CreateMetaField(String Name, String FriendlyName, String TypeName, Boolean IsNullable, String DefaultValue, AttributeCollection Attributes) +1077
Mediachase.BusinessFoundation.Data.Meta.Management.MetaFieldBuilder.CreateText(String name, String friendlyName, Boolean isNullable, Int32 maxLength, Boolean isUnique) +352
Mediachase.Commerce.Customers.Plugins.AutoInstallMetaDataModule.InstallUserId(String connectionString) +227
Mediachase.Commerce.Customers.Plugins.AutoInstallMetaDataModule.Execute(BusinessContext context) +261
Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePlugins(EventPipeLineStage eventPipeLineStage) +113
Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute(Request request) +271
Mediachase.Commerce.Customers.CustomerContext.InnerGetContactByUserId(String userId) +317
EPiServer.Framework.Cache.HttpRuntimeCache.ReadThrough(String key, Func`1 readValue, Func`1 evictionPolicy) +83
Mediachase.Commerce.Extensions.ObjectInstanceCacheExtensions.ReadThrough(IObjectInstanceCache cache, Boolean useCache, String cacheKey, IEnumerable`1 masterKeys, TimeSpan duration, Func`1 load) +229
Mediachase.Commerce.Extensions.ObjectInstanceCacheExtensions.ReadThrough(IObjectInstanceCache cache, String cacheKey, IEnumerable`1 masterKeys, TimeSpan duration, Func`1 load) +109
Mediachase.Commerce.Customers.CustomersCache.ReadThrough(String key, IEnumerable`1 masterKeys, TimeSpan timeout, Func`1 load) +336
Mediachase.Commerce.Customers.CustomerContext.ExecuteThroughCache(String key, TimeSpan timeout, Func`1 load) +78
Mediachase.Commerce.Security.PrincipalExtensions.GetCustomerContact(IPrincipal principal) +247
Mediachase.Commerce.Security.PrincipalExtensions.GetContactId(IPrincipal principal) +197
Mediachase.Commerce.Core.Modules.BusinessFoundationInitializeModule.context_AuthorizeRequest(Object sender, EventArgs e) +31
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

#131922
Aug 10, 2015 12:23
Vote:
 

Hi,

I can confirm this happens sometimes. We're still tracking it, but my impression is it's annoying but harmless. It might be the order of initializations messes up, but after you refresh it it run well and no visible effect is shown.

Regards,

/Q

#131962
Aug 11, 2015 7:27
Vote:
 

Hi,

Thanks for your answer.

And do you know if someone already reported this as a bug? Then I could check the status in change log.

#131963
Aug 11, 2015 8:53
Vote:
 

I'm having this problem too. Has anyone been able to find the cause?

#140503
Oct 21, 2015 14:22
Vote:
 

Hi,

We're working on this bug and it seems to be caused by a race condition. Fortunately It only happens during site initialization and will disappear after refreshing the site.

A fix might be available in upcoming releases of Commerce9.

Regards.

/Q

#140509
Oct 21, 2015 15:48
Vote:
 

The bug is now fixed and will be released in next release of Commerce (Possibly 9.2)

Regards,

/Q

#140689
Oct 27, 2015 18:46
Vote:
 

And now it's released: 

http://world.episerver.com/support/Bug-list/bug/COM-279

:)

Regards,

/Q

#141219
Nov 10, 2015 14:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.