Andy Bentley opened SPR-7485 and commented
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.\
Affects: 3.0 GA, 3.0.1, 3.0.2, 3.0.3, 3.0.4
Comment From: spring-projects-issues
Chris Beams commented
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?
Comment From: spring-projects-issues
Juergen Hoeller commented
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
Comment From: spring-projects-issues
Chris Beams commented
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.
Comment From: spring-projects-issues
Yican Cao commented
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.\
Comment From: spring-projects-issues
Chris Beams commented
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.
Comment From: juanvieasytec
Juergen Hoeller commented
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
Thank you very much. An indirect dependence was taking spring-beans 4.2.5 while spring-core was 4.1.3