Quartz - java.lang.ClassCastException org.quartz.JobDetail cannot be cast to ScheduledJobDetail with JobStoreTX?

The problem is likely to be that you have subclassed JobDetail When you used RAMJobStore your ScheduledJobDetail objects would have been kept in memory, and so you could cast back from JobDetail without a problem. When using a database JobStore though, Quartz will be reconstructing the JobDetail objects itself, and it has no way of knowing that you want it to use a custom class for this, and so you get the exception Even if Quartz did know to use a ScheduledJobDetail it would have no way of handling the additional fields you added Subclassing JobDetail is not the way to go. You need to find some other way of encoding this information, without subclassing.

The problem is likely to be that you have subclassed JobDetail. When you used RAMJobStore, your ScheduledJobDetail objects would have been kept in memory, and so you could cast back from JobDetail without a problem. When using a database JobStore, though, Quartz will be reconstructing the JobDetail objects itself, and it has no way of knowing that you want it to use a custom class for this, and so you get the exception.

Even if Quartz did know to use a ScheduledJobDetail, it would have no way of handling the additional fields you added. Subclassing JobDetail is not the way to go. You need to find some other way of encoding this information, without subclassing.

136672 DefaultQuartzScheduler_QuartzSchedulerThread DEBUG org.quartz.impl.jdbcjobstore. 136672 DefaultQuartzScheduler_QuartzSchedulerThread DEBUG org.quartz.impl.jdbcjobstore. 136672 DefaultQuartzScheduler_QuartzSchedulerThread DEBUG org.quartz.impl.jdbcjobstore.

136703 DefaultQuartzScheduler_QuartzSchedulerThread DEBUG org.quartz.impl.jdbcjobstore. 136703 DefaultQuartzScheduler_QuartzSchedulerThread DEBUG org.quartz.simpl. 136703 DefaultQuartzScheduler_Worker-3 DEBUG org.quartz.core.

136703 DefaultQuartzScheduler_Worker-3 ERROR org.quartz.core. 136703 DefaultQuartzScheduler_Worker-3 ERROR org.quartz.core. ErrorLogger - Job (group152.152 threw an exception.

SchedulerException: Job threw an unhandled exception. See nested exception: java.lang. Caused by: java.lang.

136703 DefaultQuartzScheduler_Worker-3 DEBUG org.quartz.impl.jdbcjobstore. 136703 DefaultQuartzScheduler_Worker-3 DEBUG org.quartz.impl.jdbcjobstore.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions