Start a new topic

Update modules (Orders 2.12)

Hi


I updated my platform from version 2.11.2 to 2.12.1

I then proceeded to update all modules that had updates available.


After the mandatory "reset", I received the following error (red bar at top of admin site):

1 modules are loaded with errors and require your attention:


 

VirtoCommerce.Orders 2.12.0
System.ApplicationException: Migrations failed with error "Arithmetic overflow error converting money to data type numeric. The statement has been terminated." ---> System.Data.SqlClient.SqlException: Arithmetic overflow error converting money to data type numeric. The statement has been terminated. ved System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) ved System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) ved System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) ved System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) ved System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) ved System.Data.SqlClient.SqlCommand.ExecuteNonQuery() ved System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) ved System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext) ved System.Data.Entity.Migrations.DbMigrator.ExecuteSql(DbTransaction transaction, MigrationStatement migrationStatement, DbInterceptionContext interceptionContext) ved System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable`1 migrationStatements, DbTransaction transaction, DbInterceptionContext interceptionContext) ved System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable`1 migrationStatements, DbConnection connection) ved System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0() ved System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) ved System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable`1 migrationStatements, DbTransaction existingTransaction) ved System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, XDocument targetModel, IEnumerable`1 operations, IEnumerable`1 systemOperations, Boolean downgrading, Boolean auto) ved System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) ved System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId) ved System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) ved System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) ved System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) ved VirtoCommerce.Platform.Data.Infrastructure.SetupDatabaseInitializer`2.InitializeDatabase(TContext context) i D:\Dev\Apps\VirtoPlatform\VirtoCommerce.Platform.Data\Infrastructure\SetupDatabaseInitializer.cs:linje 49 --- Slutten på sporingen av intern unntaksstakk --- ved VirtoCommerce.Platform.Data.Infrastructure.SetupDatabaseInitializer`2.InitializeDatabase(TContext context) i D:\Dev\Apps\VirtoPlatform\VirtoCommerce.Platform.Data\Infrastructure\SetupDatabaseInitializer.cs:linje 53 ved VirtoCommerce.OrderModule.Web.Module.SetupDatabase() ved VirtoCommerce.Platform.Web.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo) i D:\Dev\Apps\VirtoPlatform\VirtoCommerce.Platform.Web\Modularity\ModuleInitializer.cs:linje 68

 Seems like I now have missed some database migrations. What do I do?


Additional info:


I am going to clear all product data in all my environments anyway.

So would it be possible to clear the data, then somehow reapply the updates to get the migrations?

If you do not want to preserve your data, just drop database and reset IIS.

Do you have customization of db schema for order module tables?

I have no custom db changes.


I have now dropped the database and recreated the store. Will fill the db with products++ during the weekend.

I also assume I have to update the storefront?

Because I get this error when trying to access the storefront:

 

Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Beskrivelse: Det oppstod et ubehandlet unntak under kjøring av gjeldende webforespørsel. Gå gjennom stakksporingen hvis du vil ha mer informasjon om feilen og hvor den oppstod i koden. 

Unntaksdetaljer: VirtoCommerce.CartModule.Client.Client.ApiException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Kildefeil: 


Linje 73:                 ShoppingCart retVal;
Linje 74: 
Linje 75:                 var cart = await _cartApi.CartModuleGetCurrentCartAsync(store.Id, customer.Id);
Linje 76:                 if (cart == null)
Linje 77:                 {

Kildefil: D:\Dev\Apps\VirtoStorefront\VirtoCommerce.Storefront\Builders\CartBuilder.cs    Linje: 75 

Stakksporing: 


[ApiException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.]
   VirtoCommerce.CartModule.Client.Client.ApiClient.Deserialize(IRestResponse response, Type type) +728
   VirtoCommerce.CartModule.Client.Api.<CartModuleGetCurrentCartAsyncWithHttpInfo>d__25.MoveNext() +979
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   VirtoCommerce.CartModule.Client.Api.<CartModuleGetCurrentCartAsync>d__24.MoveNext() +153
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   VirtoCommerce.Storefront.Builders.<<GetOrCreateNewTransientCartAsync>b__0>d.MoveNext() in D:\Dev\Apps\VirtoStorefront\VirtoCommerce.Storefront\Builders\CartBuilder.cs:75
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28

 

Login or Signup to post a comment