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

System.ArgumentException: 'Job class cannot be null.' #30

Open
schalling opened this issue Nov 4, 2021 · 1 comment
Open

System.ArgumentException: 'Job class cannot be null.' #30

schalling opened this issue Nov 4, 2021 · 1 comment

Comments

@schalling
Copy link

schalling commented Nov 4, 2021

Hi

Using Quartz.Spi.MongoDbJobStore 3.1.0, .Net5.0, 64 bit.

I'm trying to add some Triggers to already created jobs - (The jobs where created by another service).
The two services share an assembly that creates the JobKey.

When calling:

await scheduler.ScheduleJob(triggerDetail).ConfigureAwait(false);

Im getting the below exception.

System.ArgumentException: 'Job class cannot be null.'
This exception was originally thrown at this call stack:
Quartz.Impl.JobDetailImpl.JobType.set(System.Type)
Quartz.Spi.MongoDbJobStore.Models.JobDetail.GetJobDetail()
Quartz.Spi.MongoDbJobStore.MongoDbJobStore.StoreTriggerInternal(Quartz.Spi.IOperableTrigger, Quartz.IJobDetail, bool, Quartz.Spi.MongoDbJobStore.Models.TriggerState, bool, bool, System.Threading.CancellationToken)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Quartz.Spi.MongoDbJobStore.MongoDbJobStore.StoreTrigger(Quartz.Spi.IOperableTrigger, bool, System.Threading.CancellationToken)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)

Tried to get the JobDetails which resulted in the same type of exception.
var jobDetail = await scheduler.GetJobDetail(triggerDetail.JobKey).ConfigureAwait(false);

I tried to add the assembly where the job implementation is present - did not change anything.

System.ArgumentException: 'Job class cannot be null.'
This exception was originally thrown at this call stack:
Quartz.Impl.JobDetailImpl.JobType.set(System.Type)
Quartz.Spi.MongoDbJobStore.Models.JobDetail.GetJobDetail()
Quartz.Spi.MongoDbJobStore.MongoDbJobStore.RetrieveJob(Quartz.JobKey, System.Threading.CancellationToken)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
...

@glucaci
Copy link
Owner

glucaci commented Jan 26, 2024

Try with 4.0.0-preview.2

@glucaci glucaci closed this as completed Jan 26, 2024
@glucaci glucaci reopened this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants