- ABP Framework version: v4.4.0
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- An exception was thrown while activating xxxController -> xxxAppService. Autofac.Core.DependencyResolutionException: An exception was thrown while activating xxxController -> xxxAppService.
- Steps to reproduce the issue: When I access the list I get an exception, after checking the logs I found the exception I am getting as above. I put debug in the Controller file and made sure it ran in there, but it didn't run to my AppService.
7 Answer(s)
-
0
hi
When I access the list I get an exception
Whitch website? and whitch page?
Can you share the full error logs?
-
0
** It is a new module that I created, this is full log:
An exception was thrown while activating CSM.Report.Top5WorkCodeAHTs.Top5WorkCodeAHTsController -> CSM.Report.Top5WorkCodeAHTs.Top5WorkCodeAHTAppService. Autofac.Core.DependencyResolutionException: An exception was thrown while activating CSM.Report.Top5WorkCodeAHTs.Top5WorkCodeAHTsController -> CSM.Report.Top5WorkCodeAHTs.Top5WorkCodeAHTAppService. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'CSM.Report.Top5WorkCodeAHTs.Top5WorkCodeAHTAppService' can be invoked with the available services and parameters: Cannot resolve parameter 'CSM.Report.Top5WorkCodeAHTs.ITop5WorkCodeAHTRepository top5WorkCodeAHTRepository' of constructor 'Void .ctor(CSM.Report.Top5WorkCodeAHTs.ITop5WorkCodeAHTRepository, Volo.Abp.Domain.Repositories.IRepository`1[CSM.Inbound.WorkcodeLevel2s.WorkcodeLevel2], Volo.Abp.Domain.Repositories.IRepository`1[CSM.Inbound.WorkcodeLevel1s.WorkcodeLevel1], Volo.Abp.Domain.Repositories.IRepository`1[CSM.Inbound.WorkcodeCategories.WorkcodeCategory])'. at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1 parameters) at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Extras.DynamicProxy.RegistrationExtensions.<>c__DisplayClass8_0`3.<EnableInterfaceInterceptors>b__1(ResolveRequestContext ctxt, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next) --- End of inner exception stack trace --- at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 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.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 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, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
-
1
-
0
Cannot resolve parameter 'CSM.Report.Top5WorkCodeAHTs.ITop5WorkCodeAHTRepository top5WorkCodeAHTRepository'
Can you share the code of Top5WorkCodeAHTAppService and Top5WorkCodeAHTRepository?
You can also check the dependencies of your modules
-
0
I have commented out the source code in the AppService section which just returns null. And I have dependencies on the main module.
-
0
I have commented out the source code in the AppService section which just returns null.
The error is in the constructor of
Top5WorkCodeAHTAppService
not methods. -
0
Thank you very much, I commented the code in the constructor and it ran into my AppService.