November Happy Hour will be moved to Thursday December 5th.

Update from 7.0 to 7.5 results in a wierd error

Vote:
 

Hi,

I went trough all the steps, updated my NuGet packages, updated the DB, then alkso Update-EPiDatabase, refactored obsolete stuff and get the compilation working again.
In other words; I have latest EPiServer dlls from NuGet repository and the latest DB from the new migration/package manager tools.
So when I browse any URL (also dashboard/edit/admin) I get the following error:

Invalid column name 'DecimalValue'.Beskrivning: Ett undantag som inte kunde hanteras uppstod när den aktuella webbegäran kördes. Mer information om felet och var i koden det uppstod finns i stackspårningen. 

Undantagsinformation: System.Data.SqlClient.SqlException: Invalid column name 'DecimalValue'.

Källfel: 

[Inga relevanta källrader]


Källfil: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b65e3b1d\4e477109\App_global.asax.0.cs    Rad: 0 

Stackspårning: 

[SqlException (0x80131904): Invalid column name 'DecimalValue'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +388
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +69
   System.Data.SqlClient.SqlDataReader.get_MetaData() +134
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6553981
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +6556619
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +586
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +104
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +288
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +171
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +17
   EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.LoadReferencesAndCollections(ProviderCallContext ctx) +457
   EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.LoadObject(ProviderCallContext context) +152
   EPiServer.Data.Providers.<>c__DisplayClass1`1.b__0() +60
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +1312
   EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext) +615
   EPiServer.Data.Dynamic.EPiServerDynamicDataStore.Load(Identity id) +72
   EPiServer.Data.Dynamic.DynamicDataCollectionEnumerator.get_Current() +330
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +495
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   EPiServer.Personalization.VisitorGroups.VisitorGroupStore.List() +278
   EPiServer.Personalization.VisitorGroups.VisitorGroupInitialization.InitializeStoredVisitorGroups(IServiceLocator locator) +98

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Delegate.DynamicInvokeImpl(Object[] args) +106
   EPiServer.Framework.Initialization.InitializationEngine.OnInitComplete() +448
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +184
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +285
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +104
   EPiServer.Global..ctor() +110
   Villaagarna.Public.Web.Global..ctor() +40
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b65e3b1d\4e477109\App_global.asax.0.cs:0

[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) +159
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +127
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +14407909
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +198
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +83
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +312
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12601936
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12441597


I have tried to delete the .NET temporary files, I tried to reboot, I tried clear and recompile..
So i did a trace oin the SQL server and I foudn this:

exec sp_executesql N'SELECT tblBigTableReference.ElementType,
tblBigTableReference.ElementStoreName,
tblBigTableReference.PropertyName,
tblBigTableReference.RefIdValue,
tblBigTableIdentity.Guid,
tblBigTableReference.LongValue,
tblBigTableReference.Type,
tblBigTableReference.StringValue,
tblBigTableReference.ExternalIdValue,
tblBigTableReference.DecimalValue
FROM [dbo].[tblBigTableReference]
LEFT OUTER JOIN [dbo].[tblBigTableIdentity] ON tblBigTableReference.RefIdValue = tblBigTableIdentity.pkId
WHERE tblBigTableReference.pkId= @Id AND (tblBigTableReference.Type = @Reference OR tblBigTableReference.Type = @Provider)',N'@Id bigint,@Reference int,@Provider int',@Id=8875,@Reference=2,@Provider=4

The .DecimalValue is a non existant property on that table in this version, so I can see where it fails..

Have I missed something in the migration process of the DB - If so, what might I have missed in the process to get this error?
Or is this a error on the EPiServer lib side - If so, how can i fix it?

#88628
Jul 21, 2014 15:14
Vote:
 

As a temp solution I manually created the column in DecimalValue in tblBigTableReference.
Would really like to know what the cause of the problem was, since my solution might cause problems with future updates.

#88631
Jul 21, 2014 18:26
Vote:
 

Hi,

Did you try to update via Deployment center before using nuget package? AFAIK the nuget packages are meant to use to update 7.5 site to latest version, not from 7.0 to 7.5. You still need Deployment Center to do that upgrade.

/Q

#88633
Jul 22, 2014 9:41
Vote:
 

Yes, I did that before the package updates.

#88642
Jul 22, 2014 12:39
Vote:
 

Did you try to compile your project and browse your site before upgrading nuget package? I would suggest to do that because it's recommeded to update nuget package on a working site.

Regards.

/Q

#88644
Jul 22, 2014 13:43
Vote:
 

Hi!

I get the same thing.

Any news on why this happens or how to resolve it?

Regards,

David

#133357
Sep 02, 2015 14:37
Vote:
 

I'm getting the same error, solve it with MattiasH's fix, adding a decimal(18,3) column called DecimalValue.

Edit: changed datatype from bigint to decimal(18,3). (Why isn't strikethrough enabled in this editor?)

#155159
Edited, Sep 09, 2016 15:41
* 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.