java.lang.ClassNotFoundException: org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean

java lang ClassNotFoundException org.springframework scheduling quartz MethodInvokingJobDetailFactoryBean

You will see this exception while working with Quartz scheduler where you are trying to use spring context to initialize your scheduler and spring don’t find its dependency jar. Below is exception details:

Caused by: java.lang.ClassNotFoundException: org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
	at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1349)
	at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320)
	... 10 more
  • Solution: To fix this issue please add spring-context-support.versionXXX.jar to your classpath and if you using maven as then please add below dependency:
<dependency>
	<groupId>org.springframework</groupId>
	<artifactId>spring-context-support</artifactId>
	<version>4.1.5.RELEASE</version>
</dependency>

 

One thought on “java lang ClassNotFoundException org.springframework scheduling quartz MethodInvokingJobDetailFactoryBean”

Leave a Reply

Your email address will not be published. Required fields are marked *