0

I am trying to use tomcat 8.0.36 in spring tool suite (sts) 3.6 version with spring 4 configuration. Server starts successfully but below error throws while starting.

DEBUG (localhost-startStop-1 ) [scheduling.annotation.ScheduledAnnotationBeanPostProcessor] Could not find default TaskScheduler bean
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:372)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:369)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:332)
    at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:192)
    at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:171)
    at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:86)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)


DEBUG (localhost-startStop-1 ) [scheduling.annotation.ScheduledAnnotationBeanPostProcessor] Could not find default ScheduledExecutorService bean
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:372)

Can some one address this issue? Thanks

Bashir
  • 2,057
  • 5
  • 19
  • 44
sasrra
  • 77
  • 1
  • 3
  • 13
  • Is it a maven or gradle project? I'm thinking classpath issue... if its a gradle project, gradle eclipse tooling does tend to 'polute' a project's classpath. – Kris Jun 21 '16 at 21:01
  • Its a maven project and maven version is 3.0.4 – sasrra Jun 22 '16 at 06:17
  • @Kris http://stackoverflow.com/questions/30431776/using-scheduled-and-enablescheduling-but-gives-nosuchbeandefinitionexception. Here they gave how to hide error from logs but not actual fix for annotation based where as they gave fix for xml way. – sasrra Jun 22 '16 at 09:38
  • 1
    you need to post some code – denov Nov 01 '16 at 05:31

0 Answers0