Spring Framework
  1. Spring Framework
  2. SPR-7485

java.lang.NoSuchMethodError: org.springframework.core.OrderComparator.sort

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0 GA, 3.0.1, 3.0.2, 3.0.3, 3.0.4
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Caused by: java.lang.NoSuchMethodError: org.springframework.core.OrderComparator.sort(Ljava/util/List;)V
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:597)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
      at edu.mit.ll.nco.producer.TestProducer.main(TestProducer.java:16)

        Activity

        Hide
        Chris Beams added a comment -

        Hi Andy,

        This method hasn't changed since it was originally added quite some time ago. Could you possibly submit a minimal test case that reproduces the exception?

        Show
        Chris Beams added a comment - Hi Andy, This method hasn't changed since it was originally added quite some time ago. Could you possibly submit a minimal test case that reproduces the exception?
        Hide
        Juergen Hoeller added a comment -

        Looks like there could be a mismatch of jars here: Are you possibly using an old spring-core.jar in combination with a newer spring-beans jar?

        Juergen

        Show
        Juergen Hoeller added a comment - Looks like there could be a mismatch of jars here: Are you possibly using an old spring-core.jar in combination with a newer spring-beans jar? Juergen
        Hide
        Chris Beams added a comment -

        Resolving as 'Cannot Reproduce' in preparation for 3.0.5 release. Andy, we'll re-open this bug if you have further comments. For now it's assumed it's some kind of version mismatch as Juergen suggests above.

        Show
        Chris Beams added a comment - Resolving as 'Cannot Reproduce' in preparation for 3.0.5 release. Andy, we'll re-open this bug if you have further comments. For now it's assumed it's some kind of version mismatch as Juergen suggests above.
        Hide
        Yican Cao added a comment -

        I have similar error while using Spring 3.0.4.RELEASE on Ubuntu 10.04 64bit
        upgrade to 3.0.5.RELEASE got this error:

        Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.setSerializationId(Ljava/lang/String;)V
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
        at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:209)
        at org.apache.camel.spring.Main.doStart(Main.java:173)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
        at org.apache.camel.impl.MainSupport.run(MainSupport.java:114)
        at org.apache.camel.impl.MainSupport.run(MainSupport.java:291)
        at org.apache.camel.spring.Main.main(Main.java:97)

        Show
        Yican Cao added a comment - I have similar error while using Spring 3.0.4.RELEASE on Ubuntu 10.04 64bit upgrade to 3.0.5.RELEASE got this error: Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.setSerializationId(Ljava/lang/String;)V at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94) at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:209) at org.apache.camel.spring.Main.doStart(Main.java:173) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56) at org.apache.camel.impl.MainSupport.run(MainSupport.java:114) at org.apache.camel.impl.MainSupport.run(MainSupport.java:291) at org.apache.camel.spring.Main.main(Main.java:97)
        Hide
        Chris Beams added a comment -

        Yican,

        This really looks like a classpath issue as well. The NoSuchMethodError is regarding DefaultListableBeanFactory.setSerializationId(String), which has been around since way back in 3.0.0.M4. This is probably due to a mismatch of versions of different spring jars on the classpath (perhaps something contributed by Camel, which I also see in the stack trace?).

        If you can reproduce this in any kind of standalone application – one where we can reproduce it for ourselves locally, of course we'll dig into it.

        Show
        Chris Beams added a comment - Yican, This really looks like a classpath issue as well. The NoSuchMethodError is regarding DefaultListableBeanFactory.setSerializationId(String) , which has been around since way back in 3.0.0.M4. This is probably due to a mismatch of versions of different spring jars on the classpath (perhaps something contributed by Camel, which I also see in the stack trace?). If you can reproduce this in any kind of standalone application – one where we can reproduce it for ourselves locally, of course we'll dig into it.

          People

          • Assignee:
            Chris Beams
            Reporter:
            Andy Bentley
            Last updater:
            Trevor Marshall
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 5 weeks, 5 days ago