Announcement Announcement Module
Collapse
No announcement yet.
quartz 1.6 spring 2.0.5 jar incompatibilty Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • quartz 1.6 spring 2.0.5 jar incompatibilty

    I have downloaded spring 2.0.5 with dependencies and used all the library files from the package and when I start my application, which uses quartz for scheduling (quartz 1.6, quartz-all-1.6.0.jar), I get the following:

    18:22:49.556 ERROR! [main] org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:203) >09> Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'scheduleJobDetail' defined in ServletContext resource [/WEB-INF/l2d-schedules-quartz.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.scheduling.quartz.JobDetailBea n]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet (Ljava/util/SetLjava/util/Set;
    Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.scheduling.quartz.JobDetailBea n]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet (Ljava/util/SetLjava/util/Set;
    Caused by: java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet (Ljava/util/SetLjava/util/Set;
    at org.quartz.JobDetail.<init>(JobDetail.java:85)
    at org.springframework.scheduling.quartz.JobDetailBea n.<init>(JobDetailBean.java:45)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:85)
    at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:61)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:759)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:724)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:387)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:156)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:287)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:244)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:187)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
    at org.mortbay.jetty.servlet.WebApplicationContext.do Start(WebApplicationContext.java:497)
    at org.mortbay.util.Container.start(Container.java:72 )
    at org.mortbay.http.HttpServer.doStart(HttpServer.jav a:753)
    at org.mortbay.util.Container.start(Container.java:72 )
    at com.iw.plugins.jettyrunner.PluginRunner.launch(Plu ginRunner.java:282)
    at com.iw.plugins.jettyrunner.PluginRunner.launch(Plu ginRunner.java:104)
    at com.iw.plugins.jettyrunner.PluginRunner.main(Plugi nRunner.java:75)
    getRootCause():
    java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet (Ljava/util/SetLjava/util/Set;
    at org.quartz.JobDetail.<init>(JobDetail.java:85)
    at org.springframework.scheduling.quartz.JobDetailBea n.<init>(JobDetailBean.java:45)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:85)
    at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:61)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:759)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:724)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:387)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:156)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:287)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:244)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:187)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
    at org.mortbay.jetty.servlet.WebApplicationContext.do Start(WebApplicationContext.java:497)
    at org.mortbay.util.Container.start(Container.java:72 )
    at org.mortbay.http.HttpServer.doStart(HttpServer.jav a:753)
    at org.mortbay.util.Container.start(Container.java:72 )
    at com.iw.plugins.jettyrunner.PluginRunner.launch(Plu ginRunner.java:282)
    at com.iw.plugins.jettyrunner.PluginRunner.launch(Plu ginRunner.java:104)
    at com.iw.plugins.jettyrunner.PluginRunner.main(Plugi nRunner.java:75)

    This would indicate to me that there is a problem either with quartz or commons-collections. I therefore replaced the quartz jar file with quartz-1.5.2.jar and the application ran fine.

    Is this a bug / incompatible jars in the distribution?

  • #2
    It looks like commons Collections is the jar it's having problems with. Have you got duplicates on the classpath? Have you used the one that's included with Spring? If it still doesn't work, it would be worth trying the commons Collections jar that comes with Quartz.
    Last edited by karldmoore; Aug 29th, 2007, 12:52 PM.

    Comment


    • #3
      No I have not got duplicates on the classpath and yes I used the one included with Spring.

      I must admit the first jar I tried replacing was commons-collections but I got it from the apache jakarta website and not from the quartz (open symphony) website. I did not try the one from open symphony because I was not sure what else this may affect.

      I was also happy with using the older quartz jar as a solution in my case, although this may not be acceptable for some.

      Comment


      • #4
        You need a more recent version of Commons Collections since this method is only included in more recent versions: In 2.1.1 it is not included, in 3.0 it is. I don't know which one is coming with Spring or Quartz. At least there should not be backwards compatibility issues since avoiding those is the main requirement of Jakarta Commons.

        Jörg

        Comment


        • #5
          Thanks Jörg, I actually tried commons-collections-3.2.jar and commons-collections-3.1.jar (two separate attempts) when I was trying to get quartz 1.6 working and it still failed.
          Last edited by pg; Jun 1st, 2007, 03:10 PM.

          Comment


          • #6
            Ok, so the one that ships with Quartz still fails? If you are still getting the same exception that sounds very suspect to me. If you've deployed a JAR that contains the method did you remove the old one?
            Last edited by karldmoore; Aug 29th, 2007, 12:51 PM.

            Comment


            • #7
              Yes. But I got the jar file from apache jakarta website but I later noted that quartz ships with commons-collections-3.1.jar.

              Comment


              • #8
                Have you tried Quartz on it's own, just to see which version will actually work with it?
                Last edited by karldmoore; Aug 29th, 2007, 12:51 PM.

                Comment


                • #9
                  I have downloaded quartz 1.6 and run a few of the examples that ship with it and they run fine.

                  Comment


                  • #10
                    This was finally traced back to an incompatible version of commons-collection.jar file in the jetty container ext folder.

                    Comment


                    • #11
                      Thanks for the feedback.

                      Jörg

                      Comment

                      Working...
                      X