Developing Quartz 2.1.5 + Spring 3.1.2.RELEASE, hits following error messages :

Caused by: java.lang.IncompatibleClassChangeError: 
	class org.springframework.scheduling.quartz.JobDetailBean has interface org.quartz.JobDetail as super class
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2901)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
	... 19 more

Solution

Quartz 2 APIs are changed a lot, and someone already filled a bug report on Spring JIRA. At this moment, “Spring 3 is NOT COMPATIBLE with Quartz 2“.

Here are 3 alternatives :

  1. Use Quartz 1.8.5, Spring 3 is integrated great with Quartz 1.x, classic and stable also.
  2. Do not use Spring’s QuartzJobBean for integration, uses Quartz’s interface / class directly.
  3. Last, what else? Please wait for the bug fixed.
Tags :
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider making a donation to the charity, thanks.

Related Posts

Popular Posts