Spring cannot inject been in class that implements Quartz Job

I am trying to send an email from a class that implements Quartz Job, in order to do that I have to @Autowire the IEmailService inside the class.

Here is the method I use to create a Quartz Job:


public Boolean sendInfoEmail(ManifestationProp manifProp, ServletRequest request) throws SchedulerException {

HttpServletRequest httpRequest = (HttpServletRequest) request;

String token = httpRequest.getHeader("jwt_token");

if(token == null) {

System.out.println("(ManifestationPropDaoImp) - TOKEN NULL");

return false;


String email = tokenUtils.getUsernameFromToken(token);

User user = userDao.findUserByEmail(email);

if(update(manifProp) != null) {

Scheduler sc = StdSchedulerFactory.getDefaultScheduler();


JobKey jobKey = new JobKey("Job_"+manifProp.getId(),"group1");

if(!sc.checkExists(jobKey)) {


System.out.println("Scheduling a Job for Manifestation Prop with ID - "+ manifProp.getId());


Read More »

By: StackOverFlow - Monday, 16 April

Related Posts

  • Older News
  • Spring: Could not determine type for PasswordEncoder StackOverFlow (3 days ago) - I have the password encoder defined as this.PasswordEncoderConfig.java@Configuration@Order(Ordered.HIGHEST_PRECEDENCE)public class PasswordEncoderConfig {@Beanpublic PasswordEncoder passwordEncoder() {return new BCryptPasswordEncoder();}}And I want to inject it into my UserTable object like this.UserTable.java@Entity@Table(name = "USER")public abstract...