Open Closed

Couldn't retrieve job because a required type was not found #1914


User avatar
0
mhdbaz created
  • ABP Framework version: 4.4.0
  • UI type: Angular / MVC / Blazor : MVC
  • DB provider: EF Core / MongoDB EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello We integrated quartz for back ground worker and Rabiit MQ for Background job I am getting an exception on OnApplicationInitialization method

context.AddBackgroundWorker<NozzleRequestForQuotationsQueueProcessor>();
[21:31:39 ERR] Error retrieving job, setting trigger state to ERROR. Quartz.JobPersistenceException: Couldn't retrieve job because a required type was not found: Could not load type 'Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter`1[[Castle.Proxies.NozzleRequestForQuotationsQueueProcessorProxy, DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Backgr oundWorkers.Quartz' ---> System.TypeLoadException: Could not load type 'Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter`1[[Castle.Proxies.NozzleRequestForQuotationsQueueProcessorProxy, DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.BackgroundWorkers.Quartz' at Quartz.Simpl.SimpleTypeLoadHelper.LoadType(String name) at Quartz.Impl.AdoJobStore.StdAdoDelegate.SelectJobDetail(ConnectionAndTransactionHolder conn, JobKey jobKey, ITypeLoadHelper loadHelper, CancellationToken cancellationToken) at Quartz.Impl.AdoJobStore.JobStoreSupport.RetrieveJob(ConnectionAndTransactionHolder conn, JobKey jobKey, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Quartz.Impl.AdoJobStore.JobStoreSupport.RetrieveJob(ConnectionAndTransactionHolder conn, JobKey jobKey, CancellationToken cancellationToken) at Quartz.Impl.AdoJobStore.JobStoreSupport.AcquireNextTrigger(ConnectionAndTransactionHolder conn, DateTimeOffset noLaterThan, Int32 maxCount, TimeSpan timeWindow, CancellationToken cancellationToken) [See nested exception: System.TypeLoadException: Could not load type 'Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter`1[[ Castle.Proxies.NozzleRequestForQuotationsQueueProcessorProxy, DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.BackgroundWorkers.Quartz' at Quartz.Simpl.SimpleTypeLoadHelper.LoadType(String name) at Quartz.Impl.AdoJobStore.StdAdoDelegate.SelectJobDetail(ConnectionAndTransactionHolder conn, JobKey jobKey, ITypeLoadHelper loadHelper, CancellationToken cancellationToken) at Quartz.Impl.AdoJobStore.JobStoreSupport.RetrieveJob(ConnectionAndTransactionHolder conn, JobKey jobKey, CancellationToken cancellationToken)]


4 Answer(s)
  • User Avatar
    0
    mhdbaz created

    I guess the problem because we are tring to use Rabbit MQ for background job and quartz for background worker

  • User Avatar
    0
    mhdbaz created

    I solved it by using QuartzBackgroundWorkerBase not AsyncPeriodicBackgroundWorkerBase

    I saw from database when I did that the job class name was Nozzle.Supplier.Procurement.Jobs.NozzleRequestForQuotationsQueueProcessor, Nozzle.Supplier.Application but when I was using AsyncPeriodicBackgroundWorkerBase it was registering the class name in database in [QRTZ_JOB_DETAILS] table as Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter1[[Castle.Proxies.NozzleRequestForQuotationsQueueProcessorProxy, DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] I guess the problem in using AsyncPeriodicBackgroundWorkerBase with quartz

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    https://docs.abp.io/en/abp/latest/Background-Workers-Quartz#create-a-background-worker

  • User Avatar
    0
    mhdbaz created

    Yes

Made with ❤️ on ABP v9.1.0-preview. Updated on November 19, 2024, 12:56