Try our conversational search powered by Generative AI!

Updating namespace of PropertyList<TCustom> that has instances with data bricks system during ModelSyncInitialization

Vote:
 

Hi there,

I'm from Developer Support Hà Nội, 

Our partner has an issue when they update namespace of PropertyList. 

with content:

Updating namespace of PropertyList that has instances with data bricks system during ModelSyncInitialization with error "Unexpected character encountered while parsing value: [. Path '', line 1, position 1.".

It seems that the property definition type name in the database is not updated correctly with the new namespace.

Stack trace: 
[JsonReaderException: Unexpected character encountered while parsing value: [. Path '', line 1, position 1.] 
Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType) +1795 
Newtonsoft.Json.JsonTextReader.ReadAsString() +14 
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) +239 
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +710 
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +276 
EPiServer.Framework.Serialization.Json.Internal.JsonObjectSerializer.Deserialize(TextReader reader, Type objectType) +68 
EPiServer.Framework.Serialization.ObjectSerializerExtensions.Deserialize(IObjectSerializer serializer, String value, Type objectType) +106 
EPiServer.DataAccess.Internal.LazyPropertyValueLoader.SetValue(PropertyData property, PropertyDataRecord dataRecord, Func`3 valueConverter) +330 
EPiServer.DataAccess.Internal.ContentLoadDB.LoadContentInternal(ContentReference contentLink, Int32 languageBranchId, DbDataReader reader) +1078 
EPiServer.DataAccess.Internal.<>c__DisplayClass4_0.b__0() +429 
EPiServer.Data.Providers.Internal.<>c__DisplayClass31_0`1.b__0() +55 
EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +65 
EPiServer.Core.<>c__DisplayClass118_0.b__0() +116 
EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait(IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy) +1109 
EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector) +898 
EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions) +309 
EPiServer.Core.Internal.DefaultContentLoader.TryGet(ContentReference contentLink, LoaderOptions loaderOptions, T& content) +584 
EPiServer.Core.Internal.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +99 
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.ValidateChangeOfModelType(PropertyDefinitionModel propertyModel, String modelName) +315 
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.SetStateForPropertyDefinitionModels(ContentTypeModel model) +185 
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.b__14_0(ContentTypeModel model) +67 
System.Threading.Tasks.<>c__DisplayClass17_0`1.b__1() +1194 
System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) +32 
System.Threading.Tasks.<>c__DisplayClass176_0.b__0(Object ) +276 
[AggregateException: One or more errors occurred.] 
System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4709604 
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +14397041 
System.Threading.Tasks.Parallel.ForWorker(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) +1353 
System.Threading.Tasks.Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) +367 
System.Threading.Tasks.Parallel.ForEach(IEnumerable`1 source, Action`1 body) +168 
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.AnalyzeProperties() +107 
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.Sync(Boolean commitChanges) +300 
EPiServer.Initialization.Internal.ModelSyncInitialization.Initialize(InitializationEngine context) +621 
EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +55 
EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +123 
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +417 
[InitializationException: Initialize action failed for Initialize on class EPiServer.Initialization.Internal.ModelSyncInitialization, EPiServer, Version=10.10.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7] 
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +962 
EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +192 
EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +886 
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +227 
EPiServer.Global..ctor() +103 
DI.Website.EPiServerApplication..ctor() +37 
ASP.global_asax..ctor() +42 
[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +197 
System.Activator.CreateInstance(Type type, Boolean nonPublic) +105 
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1484 
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +289 
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27 
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +80 
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +313 
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +359 
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.] 
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +534 
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +117 
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +726

So, Could we fix it in the next version?

#181277
Aug 15, 2017 13:32
Vote:
 

+1

Also had issues with this earlier. Had to update the namespace in the db to fix it :/

#181342
Aug 16, 2017 15:08
Vote:
 

I seem to having this issue after some refactoring, but I can´t find my property lists in the database, can you point me in the right direction? I´ve checked several tables but I think they should be in the table tblContentType because that´s where I found page types, block types etc, but can´t find my property lists. Isn´t that weird?

Thanks!

#182545
Sep 22, 2017 12:41
Vote:
 

Hi Petra, we had to change the table with name "tblPropertyDefinitionType". We updated the AssemblyName column to point to the new namespace after refactoring

#182546
Sep 22, 2017 12:50
Vote:
 

I didn´t work fully for us though and instead of troubleshooting it further (time constraints) we took a database copy from production since we needed a database with fresh content anyway.

Definitely learned something though! Thanks!

#182589
Sep 25, 2017 16:55
This thread is locked and should be used for reference only.
* 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.