Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6version Wroked with MediatR framework throw nullreferenceException #390

Closed
charzhao opened this issue Aug 10, 2022 · 2 comments
Closed

Comments

@charzhao
Copy link

if you use MediatR and EasyCaching and also use two level cache .

you will get nullreferenceException at MediatR handler layer.

at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
DependencyResolutionException An exception was thrown while activating GigaLife.Questionnaire.Application.Queries.QuestionnaireTemplate.QuestionnaireTemplateQueryHandler -> GigaLife.Questionnaire.Repository.QuestionnaireTemplateRepository -> EasyCaching.Interceptor.Castle.EasyCachingInterceptor -> λ:EasyCaching.Core.IHybridCachingProvider -> EasyCaching.Bus.CSRedis.DefaultCSRedisBus -> λ:EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient[] -> λ:EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient. Void Execute(Autofac.Core.Resolving.Pipeline.ResolveRequestContext, System.Action1[Autofac.Core.Resolving.Pipeline.ResolveRequestContext]) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next)
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, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
at Tesla.Enterprise.Core.ServiceCollectionExtension.<>c__DisplayClass0_0.b__1(Type t)
at MediatR.ServiceFactoryExtensions.GetInstance[T](ServiceFactory factory)
at MediatR.Internal.RequestHandlerBase.GetHandler[THandler](ServiceFactory factory)
NullReferenceException Object reference not set to an instance of an object. EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient b__3_0(System.IServiceProvider) at EasyCaching.Bus.CSRedis.CSRedisOptionsExtension.<>c.b__3_0(IServiceProvider x)

@charzhao charzhao changed the title Wroked with MediatR framework throw nullreferenceException 1.6version Wroked with MediatR framework throw nullreferenceException Aug 10, 2022
@catcherwong
Copy link
Member

@charzhao Thanks for your interest in this project.

Could you please provide a sample to reproduce this issue?

@catcherwong
Copy link
Member

No response, Closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants