Ends in:
7 DAYS
20 HRS
21 MIN
16 SEC
Ends in:
7 D
20 H
21 M
16 S

Activities of "p.j.keukens"

  • ABP Framework version: v8.0.5
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • 2024-04-10 17:06:18.233 +02:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

2024-04-10 17:06:18.234 +02:00 [ERR] The entity type 'ExtraPropertyDictionary' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943. System.InvalidOperationException: The entity type 'ExtraPropertyDictionary' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943. at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.ValidateNonNullPrimaryKeys(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Infrastructure.ModelRuntimeInitializer.Initialize(IModel model, Boolean designTime, IDiagnosticsLogger1 validationLogger) at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, ModelCreationDependencies modelCreationDependencies, Boolean designTime) at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel(Boolean designTime) at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__8_4(IServiceProvider p) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at ResolveService(ILEmitResolverBuilderRuntimeContext, ServiceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.EntityFrameworkCore.DbContext.get_ContextServices() at Microsoft.EntityFrameworkCore.DbContext.get_ChangeTracker() at Volo.Abp.EntityFrameworkCore.AbpDbContext1.Initialize(AbpEfCoreDbContextInitializationContext initializationContext) at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString) at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.GetDbContextAsync() at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.GetDbSetAsync() at TestProject1.Claims.Claims.EfCoreClaimRepositoryBase.GetQueryForNavigationPropertiesAsync() in C:\SERVER\Innoview\Projects\VS2022\TestProject1\modules\TestProject1.Claims\src\TestProject1.Claims.EntityFrameworkCore\Claims\EfCoreClaimRepository.cs:line 52 at TestProject1.Claims.Claims.EfCoreClaimRepositoryBase.GetCountAsync(String filterText, String name, Nullable1 intermediaryId, CancellationToken cancellationToken) in C:\SERVER\Innoview\Projects\VS2022\TestProject1\modules\TestProject1.Claims\src\TestProject1.Claims.EntityFrameworkCore\Claims\EfCoreClaimRepository.cs:line 93 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at TestProject1.Claims.Claims.ClaimsAppServiceBase.GetListAsync(GetClaimsInput input) in C:\SERVER\Innoview\Projects\VS2022\TestProject1\modules\TestProject1.Claims\src\TestProject1.Claims.Application\Claims\ClaimsAppService.cs:line 42 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at lambda_method6514(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

  • Steps to reproduce the issue:
  • Use ABP Suite to create a new application
  • Use ABP Suite to add 2 modules (ModA and ModB) to the new application
  • Use ABP Suite, open ModA, add a FullAuditedAggregateRoot named ObjA with Guid and one property: name (string). Save and Generate
  • Use ABP Suite, open ModB, add a FullAuditedAggregateRoot named ObjB with Guid and one property: name (string) and a Navigation property (1-N) to ObjA in ModA (using select file) then save and generate.
  • Open application in visual studio. Link ModA projects to ModB and make them required.
  • Add Migration and run the project, login and go to the main page for ModB (with the linked property), it will give the error [ERR] The entity type 'ExtraPropertyDictionary'

I have prepared a test project, that is fully configured and has this problem.

I did look at the items in the docs and samples etc, but couldn't find a good solution.

This problem started when I migrated my production project with about 10 modules in there from ABP version 7.0.3 to 8.0.5. After the migration I added a new module and linked it to one of my other modules. And added a 1-n navigation property from the new module to the old module.

I tried linking the DBContexts but that didn't solve the problem.

Here is the test project with the two modules, it also contains the log file with the error and the .suite entity defenitions.

https://www.dropbox.com/scl/fi/1675evyhkgmhw6hapal6j/TestProject1.zip?rlkey=2myio6depstr21zkzc8592mj4&dl=0

  • ABP Framework version: v7.0.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC): yes / no
  • Exception message and stack trace:
  • An exception was thrown while activating Castle.Proxies.ReferenceDataProxy. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.ReferenceDataProxy. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Castle.Proxies.ReferenceDataProxy' can be invoked with the available services and parameters: Cannot resolve parameter 'ReferenceData.IReferenceDataRepository referenceDataRepository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], ReferenceData.IReferenceDataRepository)'.
  • Steps to reproduce the issue: Steps to reproduce:
  1. Have a tiered application using MVC and Ef-Core based on the application template
  2. Add a module and reference is from the main project
  3. In the EntityFrameworkCore project of the module add an entity and a repository class
  4. In the Domain project of the module add an interface
  5. In the Application module of the module create an AppService where the custom repository is injected
  6. Some how it cannot resolve the repository and I can't find the problem, if I use IRepository&lt;ReferenceData, string> directly in the AppService that works. But what am I missing that the custom repository isn't registered in the dependency Injection?

Here are the code definitions used:

//Repository in EntityFrameworkCore project of application module
public class EfCoreReferenceDataRepository : EfCoreRepository<ReferenceDbContext, ReferenceData, string>, IReferenceDataRepository
{
	public EfCoreReferenceDataRepository(IDbContextProvider<ReferenceDbContext> dbContextProvider)
		: base(dbContextProvider)
	{
	}
}

//Interface in Domain module of application module (Also tried IRepository<ReferenceData, string> also tried adding ITransientDependency)
public interface IReferenceDataRepository : IBasicRepository<ReferenceData, string>

// Dependency injection in AppService of application module
public ReferenceDataAppService(IReferenceDataRepository referenceDataRepository)

In other modules in the project this works fine, these modules have been upgraded from version 6.0.5 to 7.0.3. The module with the problem is added to the application as a new v7.0.3 module.

I do not use: SkipAutoServiceRegistration

Documentation says: Some specific types are registered to dependency injection by default. Examples:

Repositories (implement BasicRepositoryBase class or its subclasses) are registered as transient.
  • ABP Framework version: v7.0.3

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes / no

  • Exception message and stack trace:

  • Autofac.Core.DependencyResolutionException HResult=0x80131500 Message=An exception was thrown while activating Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionEndpointDataSourceFactory -> Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider -> λ:Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider[] -> Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider -> Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModelFactory -> λ:Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider[] -> Microsoft.AspNetCore.Mvc.ApplicationModels.DefaultApplicationModelProvider -> Microsoft.Extensions.Options.UnnamedOptionsManager1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] -> Microsoft.Extensions.Options.OptionsFactory1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] -> λ:Microsoft.Extensions.Options.IConfigureOptions1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]][] -> Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcOptionsSetup -> Volo.Abp.Localization.AbpStringLocalizerFactory -> Volo.Abp.LanguageManagement.External.ExternalLocalizationStore. Source=Autofac StackTrace: at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0() at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func1 creator) at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable1 qualifyingId, Func1 creator) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) at Autofac.Core.Resolving.ResolveOperation.InvokePipeline(ResolveRequest request, DefaultResolveRequestContext requestContext) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request) at Autofac.Core.Container.ResolveComponent(ResolveRequest request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints) at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, String name, String pattern, Object defaults, Object constraints, Object dataTokens) at Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule.<>c.<ConfigureServices>b__1_10(EndpointRouteBuilderContext endpointContext) at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.<>c__DisplayClass0_0.<UseConfiguredEndpoints>b__0(IEndpointRouteBuilder endpoints) at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action1 configure) at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.UseConfiguredEndpoints(IApplicationBuilder app, Action`1 additionalConfigurationAction) at Nico.Web.NicoWebModule.OnApplicationInitialization(ApplicationInitializationContext context) in C:\SERVER\Innoview\Projects\VS2022\Nico7\Application\src\Nico.Web\NicoWebModule.cs:line 605 at Volo.Abp.Modularity.AbpModule.OnApplicationInitializationAsync(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.

    This exception was originally thrown at this call stack: [External Code]

Inner Exception 1: DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions`1[Volo.Abp.Localization.AbpLocalizationOptions], Volo.Abp.LanguageManagement.External.ILocalizationResourceRecordRepository, Volo.Abp.LanguageManagement.External.IExternalLocalizationStoreCache)' on type 'ExternalLocalizationStore'.

Inner Exception 2: MissingMethodException: Method not found: 'Volo.Abp.Localization.LocalizationResource Volo.Abp.Localization.LocalizationResourceExtensions.AddVirtualJson(Volo.Abp.Localization.LocalizationResource, System.String)'.

  • Steps to reproduce the issue:" Upgraded abp from version 6.0 to 7.0.3

In your documentation I can see that there were changes to the LocalizationResource and that it could be a breaking change. The application crashes on app.UseConfigureEndpoints() in my main webmodule. I did create a migration and updated the database after the update to abp version 7.0.3.

So it broke my application but I don't see what I need to do to resolve it, can you help? Kind Regards,

Patrick

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.0 (Commercial)
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi,

We have created an entity with a field where we store a JSON object. On this entity we also use AuditLogging which is very important to us. The field where we store the JSON object is of type VARCHAR(MAX). When a change is written in the audit log the JSON is capped to 512 characters as the field "OriginalValue" and "NewValue" in the table "AbpEntityPropertyChanges" are only VARCHAR(512).

We changed the entity configuration to the config below, created a migration and applied changes to the database:

        builder.Entity< Volo.Abp.AuditLogging.EntityPropertyChange >().Property(x => x.OriginalValue).Metadata.RemoveAnnotation("MaxLength");
        builder.Entity< Volo.Abp.AuditLogging.EntityPropertyChange >().Property(x => x.NewValue).Metadata.RemoveAnnotation("MaxLength");
        builder.Entity< Volo.Abp.AuditLogging.EntityPropertyChange >().Property(x => x.OriginalValue).HasColumnType("nvarchar(max)");
        builder.Entity< Volo.Abp.AuditLogging.EntityPropertyChange >().Property(x => x.NewValue).HasColumnType("nvarchar(max)");

Also we changed the MaxNewValueLength and MaxOriginalValueLength to 1.000.000

        EntityPropertyChangeConsts.MaxNewValueLength = 1000000;
        EntityPropertyChangeConsts.MaxOriginalValueLength = 1000000;

In the Constructor (shown in codeblock below) of the EntityPropertyChange it truncates the value based upon MaxNewValueLength and MaxOriginalValueLength so setting it to 1000000 should store all info but in the database the original and new value are still 512 characters. Is there another place where the data is truncated? How can I fix this so that the full JSON object can be stored in the audit log?

public EntityPropertyChange(
        IGuidGenerator guidGenerator,
        Guid entityChangeId,
        EntityPropertyChangeInfo entityChangeInfo,
        Guid? tenantId = null)
    {
        Id = guidGenerator.Create();
        TenantId = tenantId;
        EntityChangeId = entityChangeId;
        NewValue = entityChangeInfo.NewValue.Truncate(EntityPropertyChangeConsts.MaxNewValueLength);
        OriginalValue = entityChangeInfo.OriginalValue.Truncate(EntityPropertyChangeConsts.MaxOriginalValueLength);
        PropertyName = entityChangeInfo.PropertyName.TruncateFromBeginning(EntityPropertyChangeConsts.MaxPropertyNameLength);
        PropertyTypeFullName = entityChangeInfo.PropertyTypeFullName.TruncateFromBeginning(EntityPropertyChangeConsts.MaxPropertyTypeFullNameLength);
    }

Also on the AuditLog we have a form which is multipart/form-data, this form is posted to the razorpage. In the audit log of the post we don't see all the data that is posted to the razorpage. Is there a way to show all the posted data in the audit log? We need this as 'proof' of what someone has posted. I see that when the ApplicationService is called it logs all data that is send to the ApplicationService method but we would like to log the posted data (without the posted files...)

Showing 1 to 4 of 4 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06