Announcement Announcement Module
Collapse
No announcement yet.
JUnit - ContextConfiguration error: bug? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JUnit - ContextConfiguration error: bug?

    Hello,

    I have a test class defined as
    @RunWith(SpringJUnit4ClassRunner.class)
    @ContextConfiguration(locations={"/beanDefinition-unittest.xml"})
    public class MyTestClass {...}

    When I start the test, it gives me the exception
    NoSuchMethodError: org.springframework.core.OrderComparator.sort(java/util/List
    Though, if I look in th CORE file of springframework.core.jar, the class is listed and in the API doc, I find the mehtod sort(List)
    What can be wrong?? Could this be a bug as the list should be of a type-safe classtype? (being String in this case?)

    Best regards,
    Xcalibur

    DEBUG XmlBeanDefinitionReader - Loaded 2 bean definitions from location pattern /beanDefinition-unittest.xml
    INFO GenericApplicationContext - Refreshing org.springframework.context.support.GenericApplica tionContext@17bd6a1: display name [org.springframework.context.support.GenericApplica tionContext@17bd6a1]; startup date [Wed Apr 01 21:40:59 CEST 2009]; root of context hierarchy
    INFO GenericApplicationContext - Bean factory for application context [org.springframework.context.support.GenericApplica tionContext@17bd6a1]: org.springframework.beans.factory.support.DefaultL istableBeanFactory@1551d7f
    DEBUG GenericApplicationContext - 5 beans defined in org.springframework.context.support.GenericApplica tionContext@17bd6a1: display name [org.springframework.context.support.GenericApplica tionContext@17bd6a1]; startup date [Wed Apr 01 21:40:59 CEST 2009]; root of context hierarchy
    java.lang.NoSuchMethodError: org.springframework.core.OrderComparator.sort(Ljav a/util/ListV
    at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:517)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:358)
    Last edited by Xcalibur; Apr 1st, 2009, 03:00 PM. Reason: Add stacktrace
Working...
X