Try our conversational search powered by Generative AI!

Could not map property ProjectId - table tblBigTable does not contain any columns that map to DbType.Int32

Vote:
 

We are upgrading a v11 CMS to v12. When running the v12 solution, the following error is logged every time the solution is run.

Could not map property ProjectId - table tblBigTable does not contain any columns that map to DbType.Int32

My understanding is that ProjectId is supposed to be stored in the DDS, but it's not configured correctly.

The only other hits I find online about this issue refer to not upgrading the database correctly and scripts not running, however, that's not an issue with v11 -> v12 upgrades since we don't have to upgrade the database manually. Going off the idea that it's a scripting issue, I looked at the available stored procedures with 'proj' in the name and found Save__ProjectName_.Web.DDS.SitemapConfigurationDataStore. This writes an entry into the tblBigTableIdentity table using '_ProjectName_.Web.DDS.SitemapConfigurationDataStore' as the storename. 

I also wonder if there's a missing entry in the tblBigTableStoreInfo table for "ProjectId". That would explain the error trying to map to Int32 since that table has PropertyName (eg "ProjectId") and PropertyType (eg "System.Int32") as well as ColumnName (eg "Integer01"). It looks like a table that would map properties to types.

I'm very interested in finding a solution for this because it seems ProjectId isn't being stored in the DDS as expected.

===> 09:36:02 [Error] An unhandled exception has occurred while executing the request.
System.InvalidOperationException: Could not map property ProjectId - table tblBigTable does not contain any columns that map to DbType.Int32
   at EPiServer.Data.Dynamic.Providers.ColumnInformationMapper.Map(KeyValuePair`2 property, Type dataType, StoreDefinitionParameters parameters, List`1 rows)
   at EPiServer.Data.Dynamic.InlinePropertyMapHandler.TryMap(KeyValuePair`2 property, PropertyMapHandlerContext context, PropertyMap& propertyMap)
   at EPiServer.Data.Dynamic.StoreDefinition.GenerateMappings(IEnumerable`1 typeBag, StoreDefinitionParameters parameters, Int32 version, IList`1 existingMappings, IDictionary`2 pendingRenames)
   at EPiServer.Data.Dynamic.StoreDefinition.<>c__DisplayClass28_0.<InternalCreate>b__0()
   at EPiServer.Data.Cache.Internal.LocalCache`2.Add(TKey key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 getAction, Action`2 setAction)
   at EPiServer.Data.Dynamic.StoreDefinition.InternalCreate(String storeName, IDictionary`2 typeBag, StoreDefinitionParameters parameters)
   at EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStoreFactory.CreateStore(String storeName, IDictionary`2 typeBag, StoreDefinitionParameters parameters)
   at EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStoreFactory.<>c__DisplayClass14_0.<GetStore>b__0()
   at EPiServer.Data.Cache.Internal.LocalCache`2.Add(TKey key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 getAction, Action`2 setAction)
   at EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStoreFactory.GetStore(Type type)
   at EPiServer.Cms.Shell.UI.Rest.Projects.Internal.DdsProjectEnhancementsStore.GetStore()
   at EPiServer.Cms.Shell.UI.Rest.Projects.Internal.DdsProjectEnhancementsStore.LoadProjectSettings(Int32 projectId)
   at EPiServer.Cms.Shell.UI.Rest.Projects.Internal.Models.ProjectConverter.GetViewModel(Project model)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at EPiServer.Shell.Services.Rest.ItemRange.ApplyTo[T](IEnumerable`1 items)
   at EPiServer.Shell.Services.Rest.RestControllerBase.Rest(IEnumerable`1 data, ItemRange range)
   at EPiServer.Cms.Shell.UI.Rest.Projects.Internal.ProjectStore.Get(Nullable`1 id, ItemRange range, IEnumerable`1 sortColumns)
   at lambda_method461(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Geta.NotFoundHandler.Infrastructure.Initialization.NotFoundHandlerMiddleware.InvokeAsync(HttpContext context, RequestHandler requestHandler)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
#324608
Jun 27, 2024 17:15
* 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.