An exception was thrown while activating Castle.Proxies.NoticeApp ServiceProxy.


具體問題如下:

 

 An exception was thrown while activating Castle.Proxies.XXXApp

ServiceProxy.

Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.XXXAppServiceProxy.

 ---> Autofac.Core.DependencyResolutionException: None of the constructors found

 with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Castle.Proxies.Not

iceAppServiceProxy' can be invoked with the available services and parameters:

Cannot resolve parameter

'Volo.Abp.Domain.Repositories.IRepository`2[SJ.ABP.XXXCenter.XXXs.XXX,System.Guid] repository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[],

 Volo.Abp.Domain.Repositories.IRepository`2[SJ.ABP.XXXCenter.XXXs.XXX,System.Guid])'.

 

   at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(Cons

tructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1

parameters)

   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IC

omponentContext context, IEnumerable`1 parameters)

   at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>

b__11_0(ResolveRequestContext ctxt, Action`1 next)

   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(Resol

veRequestContext context, Action`1 next)

   at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAut

owired>b__0(ResolveRequestContext ctxt, Action`1 next)

   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.Builder.RegistrationBuilder`3.<>c__DisplayClass35_0.<OnPreparing>b

__0(ResolveRequestContext ctxt, Action`1 next)

   at Autofac.Core.Resolving.Middleware.CoreEventMiddleware.Execute(ResolveReque

stContext context, Action`1 next)

   at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequest

Context context, Action`1 next)

   at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Exe

cute(ResolveRequestContext context, Action`1 next)

   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifeti

meScope currentOperationScope, ResolveRequest request)

   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest re

quest)

   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context,

Service service, IEnumerable`1 parameters, Object& instance)

   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Ser

vice service, IEnumerable`1 parameters)

   at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Creat

e(ControllerContext actionContext)

   at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__Displa

yClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext contr

ollerContext)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State

& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInne

rFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExcepti

onFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next

, Scope scope, Object state, Boolean isCompleted)

[21:43:28 ERR] ---------- Exception Data ----------

ActivatorChain = Castle.Proxies.XXXAppServiceProxy

 

 

 

解決方案:

如下圖,缺少數據庫對應表的映射,把相應的表增加進來就好了;

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM