Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. @Configuration
  2. @EnableScheduling
  3. public class MyScheduler {
  4.  
  5.  
  6. @Autowired
  7. MyBusinessService businessService;
  8.  
  9.  
  10. @Scheduled(cron = "* * * * * *")
  11. public void myCronMethod() {
  12.  
  13. }
  14. }
  15.  
  16. java.lang.NullPointerException
  17. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.resolveSchedulerBean(ScheduledAnnotationBeanPostProcessor.java:281)
  18. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:221)
  19. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:200)
  20. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:94)
  21. at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
  22. at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
  23. at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
  24. at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:337)
  25. at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)
  26. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545)
  27. at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
  28. at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
  29. at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
  30. at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
  31. at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
  32. at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
  33. at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
  34. at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
  35. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  36. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  37. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  38. at java.lang.Thread.run(Thread.java:745)
  39.  
  40. NamedBeanHolder<T> holder = ((AutowireCapableBeanFactory) this.beanFactory).resolveNamedBean(schedulerType);
  41.  
  42. interface org.springframework.scheduling.TaskScheduler
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement