Announcement Announcement Module
Collapse
No announcement yet.
IncompatibleClassChangeError: org/.../.../type/classreading/AnnotationMetadataReading Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • IncompatibleClassChangeError: org/.../.../type/classreading/AnnotationMetadataReading

    Hi, I am new to Spring, and I need to get a project to run successfully with Eclipse on JDK7. The project was previously running on JDK6.

    I have all the source files, and jars that belonged to the original project in place. But when I try to run it, I get the following exception:

    org.springframework.beans.factory.BeanDefinitionSt oreException: Failed to read candidate component class: file [C:\Users\e\workspace\.metadata\.plugins\org.eclips e.wst.server.core\tmp1\wtpwebapps\DMControl\WEB-INF\classes\com\...\...\...\MyClass.class]; nested exception is java.lang.IncompatibleClassChangeError: org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor

    The only clue I have is that the first time I tried to run this, I got an error saying that I don't have the

    org.springframework.core.io.support.SpringFactorie sLoader.

    I looked in my spring-core-3.1.2.RELEASE.jar and indeed the SpringFactoriesLoader wasn't there. Checking the current release, I found out that the missing class is indeed in the spring-core-3.2.2.RELEASE.jar.

    So I changed the spring jars to the latest version. But now I get the exception in the title of this question.

    Any idea?

    The full stacktrace:

    org.springframework.beans.factory.BeanDefinitionSt oreException: Failed to read candidate component class: file [C:\Users\e\workspace\.metadata\.plugins\org.eclips e.wst.server.core\tmp1\wtpwebapps\FTAdControl\WEB-INF\classes\com\fashiontraffic\adcontrol\health\re stwebservices\HealthWSImpl.class]; nested exception is java.lang.IncompatibleClassChangeError: org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor
    at org.springframework.context.annotation.ClassPathSc anningCandidateComponentProvider.findCandidateComp onents(ClassPathScanningCandidateComponentProvider .java:281)
    at org.springframework.context.annotation.ClassPathBe anDefinitionScanner.doScan(ClassPathBeanDefinition Scanner.java:242)
    at org.springframework.context.annotation.ComponentSc anBeanDefinitionParser.parse(ComponentScanBeanDefi nitionParser.java:84)
    at org.springframework.beans.factory.xml.NamespaceHan dlerSupport.parse(NamespaceHandlerSupport.java:73)
    at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1438)
    at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1428)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:185)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.doRegisterBeanDefinitions( DefaultBeanDefinitionDocumentReader.java:139)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:108)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:174)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:209)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:180)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:125)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:94)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:130)
    at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:537)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:451)
    at org.springframework.web.servlet.FrameworkServlet.c onfigureAndRefreshWebApplicationContext(FrameworkS ervlet.java:631)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:5 88)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:6 45)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:508 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:449)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:133)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:242)
    at org.apache.catalina.core.StandardWrapper.initServl et(StandardWrapper.java:1190)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1103)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:1010)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4957)
    at org.apache.catalina.core.StandardContext$3.call(St andardContext.java:5284)
    at org.apache.catalina.core.StandardContext$3.call(St andardContext.java:5279)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Caused by: java.lang.IncompatibleClassChangeError: org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor
    at org.springframework.core.type.classreading.SimpleM etadataReader.<init>(SimpleMetadataReader.java:63)
    at org.springframework.core.type.classreading.SimpleM etadataReaderFactory.getMetadataReader(SimpleMetad ataReaderFactory.java:80)
    at org.springframework.core.type.classreading.Caching MetadataReaderFactory.getMetadataReader(CachingMet adataReaderFactory.java:102)
    at org.springframework.context.annotation.ClassPathSc anningCandidateComponentProvider.findCandidateComp onents(ClassPathScanningCandidateComponentProvider .java:257)
    ... 38 more
Working...
X