Open Closed

AbpTextTemplateDefinitionContentRecords Invalid #8596


User avatar
0
327992883@qq.com created
  • ABP Framework version: v8.3.4

  • UI Type: Blazor Server

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

  • Exception message and full stack trace:

  • [18:41:54 WRN] Savepoints are disabled because Multiple Active Result Sets (MARS) is enabled. If 'SaveChanges' fails, then the transaction cannot be automatically rolled back to a known clean state. Instead, the transaction should be rolled back by the application before retrying 'SaveChanges'. See https://go.microsoft.com/fwlink/?linkid=2149338 for more information and examples. To identify the code which triggers this warning, call 'ConfigureWarnings(w => w.Throw(SqlServerEventId.SavepointsDisabledBecauseOfMARS))'. [18:41:54 ERR] Failed executing DbCommand (24ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 10), @p2='?' (Size = 256), @p3='?' (Size = 4000), @p4='?' (DbType = Boolean), @p5='?' (DbType = Boolean), @p6='?' (Size = 256), @p7='?' (Size = 256), @p8='?' (Size = 128), @p9='?' (Size = 64), @p10='?' (DbType = Guid), @p11='?' (Size = 10), @p12='?' (Size = 256), @p13='?' (Size = 4000), @p14='?' (DbType = Boolean), @p15='?' (DbType = Boolean), @p16='?' (Size = 256), @p17='?' (Size = 256 ), @p18='?' (Size = 128), @p19='?' (Size = 64), @p20='?' (DbType = Guid), @p21='?' (Size = 10), @p22='?' (Size = 256), @p23='?' (Size = 4000), @p24='?' (DbType = Boolean), @p25='?' (DbType = Boolean), @p26='?' (Size = 256), @p27='?' (Size = 256), @p28='?' (Size = 128), @p29='?' (Size = 64), @p30='?' (DbType = Guid), @p31='?' (Size = 10), @p32='?' (Size = 256), @p33='?' (Size = 4000), @p34='?' (DbType = Boolean), @p35='?' (DbType = Boolean), @p36='?' (Size = 256), @p37='?' (Size = 256), @ p38='?' (Size = 128), @p39='?' (Size = 64), @p40='?' (DbType = Guid), @p41='?' (Size = 10), @p42='?' (Size = 256), @p43='?' (Size = 4000), @p44='?' (DbType = Boolean), @p45='?' (DbType = Boolean), @p46='?' (Size = 256), @p47='?' (Size = 256), @p4 8='?' (Size = 128), @p49='?' (Size = 64), @p50='?' (DbType = Guid), @p51='?' (DbType = Guid), @p52='?' (Size = 4000), @p53='?' (Size = 256), @p54='?' (DbType = Guid), @p55='?' (DbType = Guid), @p56='?' (Size = 4000), @p57='?' (Size = 256), @p58=' ?' (DbType = Guid), @p59='?' (DbType = Guid), @p60='?' (Size = 4000), @p61='?' (Size = 256), @p62='?' (DbType = Guid), @p63='?' (DbType = Guid), @p64='?' (Size = 4000), @p65='?' (Size = 256), @p66='?' (DbType = Guid), @p67='?' (DbType = Guid), @p68='?' (Size = 4000), @p69='?' (Size = 256)], CommandType='Text', CommandTimeout='30'] SET NOCOUNT ON; INSERT INTO [AbpTextTemplateDefinitionRecords] ([Id], [DefaultCultureName], [DisplayName], [ExtraProperties], [IsInlineLocalized], [IsLayout], [Layout], [LocalizationResourceName], [Name], [RenderEngine]) VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9), (@p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19), (@p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27, @p28, @p29), (@p30, @p31, @p32, @p33, @p34, @p35, @p36, @p37, @p38, @p39), (@p40, @p41, @p42, @p43, @p44, @p45, @p46, @p47, @p48, @p49); INSERT INTO [AbpTextTemplateDefinitionContentRecords] ([Id], [DefinitionId], [FileContent], [FileName]) VALUES (@p50, @p51, @p52, @p53), (@p54, @p55, @p56, @p57), (@p58, @p59, @p60, @p61), (@p62, @p63, @p64, @p65), (@p66, @p67, @p68, @p69); [18:41:54 ERR] An exception occurred in the database while saving changes for context type 'Volo.Abp.TextTemplateManagement.EntityFrameworkCore.TextTemplateManagementDbContext'. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): 对象名 'AbpTextTemplateDefinitionContentRecords' 无效。 at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__195_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) ClientConnectionId:03672c3d-1021-411f-9cde-c0dd264317b6 Error Number:208,State:1,Class:16 --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): 对象名 'AbpTextTemplateDefinitionContentRecords' 无效。 at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__195_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) ClientConnectionId:03672c3d-1021-411f-9cde-c0dd264317b6 Error Number:208,State:1,Class:16 --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken) at Volo.Abp.TextTemplateManagement.TextTemplates.StaticTextTemplateSaver.SaveAsync() [18:41:54 INF] Completed to save external localizations. [18:41:54 ERR] An error occurred while saving the entity changes. See the inner exception for details. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): 对象名 'AbpTextTemplateDefinitionContentRecords' 无效。 at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__195_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) ClientConnectionId:03672c3d-1021-411f-9cde-c0dd264317b6 Error Number:208,State:1,Class:16 --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken) at Volo.Abp.TextTemplateManagement.TextTemplates.StaticTextTemplateSaver.SaveAsync() at Volo.Abp.TextTemplateManagement.TextTemplates.StaticTextTemplateSaver.SaveAsync() at Volo.Abp.TextTemplateManagement.TextTemplates.StaticTextTemplateSaver.SaveAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.TextTemplateManagement.TextTemplateManagementDomainModule.<>c__DisplayClass8_0.<<SaveStaticTemplatesToDatabaseAsync>b__1>d.MoveNext() --- End of stack trace from previous location --- at Polly.AsyncPolicy.<>c__DisplayClass40_0.<<ImplementationAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)

  • Steps to reproduce the issue:

  • when i start the AuthServer project,It throws an exception indicating that the AbpTextTemplateDefinitionContentRecords table does not exist. I followed the migration guide: https://abp.io/docs/latest/release-info/migration-guides. I upgraded from 7.2.3 to 8.3.4. I upgraded from 7.2 to 7.3, and then from 7.3 to 7.4, and so on, upgrading step by step to 8.3.4. Each time, I updated the database and added database migration files during the upgrade process of each version. However, I could not find the relevant content of the AbpTextTemplateDefinitionContentRecords table.


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is this table creation code in your new migration file?

  • User Avatar
    0
    327992883@qq.com created

    hi

    Is this table creation code in your new migration file?

    no,i can't find this table name in my new migration file

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can you share the source code of your project? liming.ma@volosoft.com

  • User Avatar
    0
    327992883@qq.com created

    Can you share the source code of your project? liming.ma@volosoft.com

    I have sent it to your email.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Do you mean run the Loda.Abp.Customers.AuthServer project?

    This project doesn't reference the Volo.Abp.TextTemplateManagement.EntityFrameworkCore

    so there will no TextTemplate tables in new migration file.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08