Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Feature request or just a Q #212

Open
otlg opened this issue Jan 27, 2021 · 1 comment
Open

Feature request or just a Q #212

otlg opened this issue Jan 27, 2021 · 1 comment

Comments

@otlg
Copy link

otlg commented Jan 27, 2021

Hi,

I faced the issue when the quartz-mongodb fails to serialize the job due to ClassNotFoundException.
That's OK, the class no longer exists in the classpath.

However, I'd like to recover from this situation, for example by job deletion.
The problem that the exception thrown from JobConverter.toJobDetail and handled in SchedulerListenerSupport.schedulerError does not contain any information about the job, except its class name.

Can full job info doc be added to the exception?

If you have any other solution to recover, will be happy for sharing.

Thanks,
Oleg.

@wakecaine1
Copy link

wakecaine1 commented Feb 2, 2021

From technical point of view this should not happen in normal production environment as it is very specific. Tho if you must do it, you can for example pre-initialize Quartz, do a check if there are jobs with specific class name by using normal mongo connector and delete records.
However, I would actually recommend to think beforehand and never make it so there are running jobs with classes that don't exist anymore in your code. It is just bad practice in my opinion to delete classes of existing jobs.

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

No branches or pull requests

2 participants