Announcement Announcement Module
Collapse
No announcement yet.
Struts2 + spring3.05 + Quartz => IncompatibleClassChangeError Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Struts2 + spring3.05 + Quartz => IncompatibleClassChangeError

    Hello,

    Struts2 + spring3.05 + Quartz.


    Tomcat6 cannot be started & showing the following exception message:
    ================================================== ====================
    org.springframework.beans.factory.CannotLoadBeanCl assException:
    Error loading class [org.springframework.scheduling.quartz.JobDetailBea n]

    for bean with name 'schedulerJob' defined in ServletContext resource
    [/WEB-INF/applicationContext-ibatis.xml]:

    problem with class file or dependent class;

    nested exception is java.lang.IncompatibleClassChangeError:
    class org.springframework.scheduling.quartz.JobDetailBea n
    has interface org.quartz.JobDetail as super class

    Two jars:
    =======================
    . quartz-2.0.0.jar
    . org.springframework.context.support-3.0.5.RELEASE.jar

    Does someone know what may cause this exception?

    Thanks a lot!
    Emi

  • #2
    Hello

    1) use code tags, is more readable for us
    2) post the complete error stack trace
    3) are you using explicitly in some place direct dependency for Quartz? (org.quartz....), If no try removing quartz-2.0.0.jar
    4) post your spring/quartz beans configuration (even for Java, if you have)

    Comment


    • #3
      Details are:
      ======================
      (1) right, I used Guartz in schedulejob class
      public class SchedulerJob extends QuartzJobBean
      {
      protected void executeInternal(JobExecutionContext context)
      throws JobExecutionException
      {
      task1.run();
      }
      }

      (2) applicationContext-ibatis.xml
      <bean id="schedulerJob" class="org.springframework.scheduling.quartz.JobDe tailBean">
      <property name="jobClass" value="SchedulerJob" />
      <property name="jobDataAsMap">
      <map>
      <entry key="task1" value-ref="task1" />
      </map>
      </property>
      </bean>

      (3) for quartz-2.0.0.jar Error details:
      ==========================================
      Please note, if I use "quartz-1.8.5.jar", no error at all!

      Comment


      • #4
        For using Quartz2.0, tomcat6 cannot start, and exception messages are:
        ==================================================


        SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
        org.springframework.beans.factory.CannotLoadBeanCl assException: Error loading class [org.springframework.scheduling.quartz.JobDetailBea n] for bean with name 'schedulerJob' defined in ServletContext resource [/WEB-INF/applicationContext-ibatis.xml]: problem with class file or dependent class; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.JobDetailBea n has interface org.quartz.JobDetail as super class
        at org.springframework.beans.factory.support.Abstract BeanFactory.resolveBeanClass(AbstractBeanFactory.j ava:1253)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.predictBeanType(Abstrac tAutowireCapableBeanFactory.java:576)
        at org.springframework.beans.factory.support.Abstract BeanFactory.isFactoryBean(AbstractBeanFactory.java :1319)
        at org.springframework.beans.factory.support.Abstract BeanFactory.isFactoryBean(AbstractBeanFactory.java :885)
        at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:562)
        at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
        at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
        at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4205)
        at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4704)
        at org.apache.catalina.manager.ManagerServlet.start(M anagerServlet.java:1276)
        at org.apache.catalina.manager.HTMLManagerServlet.sta rt(HTMLManagerServlet.java:625)
        at org.apache.catalina.manager.HTMLManagerServlet.doG et(HTMLManagerServlet.java:136)
        at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
        at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
        at org.apache.catalina.filters.CsrfPreventionFilter.d oFilter(CsrfPreventionFilter.java:186)
        at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:563)
        at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
        Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.JobDetailBea n has interface org.quartz.JobDetail as super class
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader. java:632)
        at java.lang.ClassLoader.defineClass(ClassLoader.java :616)
        at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
        at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2818)
        at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1159)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1647)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1526)
        at org.springframework.util.ClassUtils.forName(ClassU tils.java:257)
        at org.springframework.beans.factory.support.Abstract BeanDefinition.resolveBeanClass(AbstractBeanDefini tion.java:408)
        at org.springframework.beans.factory.support.Abstract BeanFactory.doResolveBeanClass(AbstractBeanFactory .java:1271)
        at org.springframework.beans.factory.support.Abstract BeanFactory.resolveBeanClass(AbstractBeanFactory.j ava:1242)
        ... 32 more

        Comment


        • #5
          2011-04-14 09:51:42,317 ERROR context.ContextLoader.initWebApplicationContext:22 0 - Context initialization failed
          org.springframework.beans.factory.CannotLoadBeanCl assException: Error loading class [org.springframework.scheduling.quartz.JobDetailBea n] for bean with name 'schedulerJob' defined in ServletContext resource [/WEB-INF/applicationContext-ibatis.xml]: problem with class file or dependent class; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.JobDetailBea n has interface org.quartz.JobDetail as super class
          at org.springframework.beans.factory.support.Abstract BeanFactory.resolveBeanClass(AbstractBeanFactory.j ava:1253)
          at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.predictBeanType(Abstrac tAutowireCapableBeanFactory.java:576)
          at org.springframework.beans.factory.support.Abstract BeanFactory.isFactoryBean(AbstractBeanFactory.java :1319)
          at org.springframework.beans.factory.support.Abstract BeanFactory.isFactoryBean(AbstractBeanFactory.java :885)
          at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:562)
          at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
          at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
          at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:276)
          at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)
          at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
          at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4205)
          at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4704)
          at org.apache.catalina.manager.ManagerServlet.start(M anagerServlet.java:1276)
          at org.apache.catalina.manager.HTMLManagerServlet.sta rt(HTMLManagerServlet.java:625)
          at org.apache.catalina.manager.HTMLManagerServlet.doG et(HTMLManagerServlet.java:136)
          at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
          at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
          at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
          at org.apache.catalina.filters.CsrfPreventionFilter.d oFilter(CsrfPreventionFilter.java:186)
          at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
          at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:563)
          at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
          at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:859)
          at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
          at java.lang.Thread.run(Thread.java:662)
          Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.JobDetailBea n has interface org.quartz.JobDetail as super class
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClassCond(ClassLoader. java:632)
          at java.lang.ClassLoader.defineClass(ClassLoader.java :616)
          at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
          at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2818)
          at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1159)
          at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1647)
          at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1526)
          at org.springframework.util.ClassUtils.forName(ClassU tils.java:257)
          at org.springframework.beans.factory.support.Abstract BeanDefinition.resolveBeanClass(AbstractBeanDefini tion.java:408)
          at org.springframework.beans.factory.support.Abstract BeanFactory.doResolveBeanClass(AbstractBeanFactory .java:1271)
          at org.springframework.beans.factory.support.Abstract BeanFactory.resolveBeanClass(AbstractBeanFactory.j ava:1242)
          ... 32 more

          Comment

          Working...
          X