Announcement Announcement Module
Collapse
No announcement yet.
java.lang.NoSuchMethodError: org.springframework.beans.factory.config.AutowireC apabl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.NoSuchMethodError: org.springframework.beans.factory.config.AutowireC apabl

    Hello,

    I have seen this post somewhere else as well and checked for duplicate jars and versions and still run into the same error everytime i deploy to tomcat.


    I started getting this when i upgraded to 2.5 from 2.0.3 and removed all the module jars from 2.0.3 and replaced it with

    Spring.jar (2.5)

    Spring-test.jar (2.5)

    Spring-aspects.jar (2.5)

    Spring-bindings.jar (2.0-m1)

    Spring-webmvc.jar (2.5)

    Spring-webflow.jar (2.0-m1)

    the complete stack trace is
    Code:
    ERROR [org.springframework.web.servlet.DispatcherServlet] - <Context initialization failed>
    
    org.springframework.beans.factory.BeanInitializationException: Error loading DispatcherServlet's default strategy class [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver] for interface [org.springframework.web.servlet.LocaleResolver]: problem with class file or dependent class; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.config.AutowireCapableBeanFactory.createBean(Ljava/lang/Class;)Ljava/lang/Object;
    
    Caused by:
    
    java.lang.NoSuchMethodError: org.springframework.beans.factory.config.AutowireCapableBeanFactory.createBean(Ljava/lang/Class;)Ljava/lang/Object;
    
            at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:762)
    
            at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:729)
    
            at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategy(DispatcherServlet.java:696)
    
            at org.springframework.web.servlet.DispatcherServlet.initLocaleResolver(DispatcherServlet.java:456)
    
            at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:409)
    
            at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:399)
    
            at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:404)
    
            at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:81)
    
            at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:66)
    
            at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
    
            at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
    
            at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
    
            at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
    
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
    
            at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
    
            at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
    
            at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
    
            at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    
            at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    
            at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
    
            at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
    
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
    
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    
            at java.lang.Thread.run(Thread.java:619)
    Here is my classpath file
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    	<classpathentry kind="src" output="target/classes" path="src/java"/>
    	<classpathentry kind="src" output="target/test-classes" path="src/test"/>
    	<classpathentry kind="lib" path="lib/test/commons-attributes-api.jar"/>
    	<classpathentry kind="lib" path="lib/test/commons-collections.jar"/>
    	<classpathentry kind="lib" path="lib/test/commons-dbcp.jar"/>
    	<classpathentry kind="lib" path="lib/test/commons-logging.jar"/>
    	<classpathentry kind="lib" path="lib/test/commons-pool.jar"/>
    	<classpathentry kind="lib" path="lib/test/dbunit.jar"/>
    	<classpathentry kind="lib" path="lib/test/dom4j.jar"/>
    	<classpathentry kind="lib" path="lib/test/jta.jar"/>
    	<classpathentry kind="lib" path="lib/test/junit.jar" sourcepath="/repository/junit/junit/sources/junit-src-3.8.1.jar"/>
    	<classpathentry kind="lib" path="lib/test/postgresql-jdbc3.jar"/>
    	<classpathentry kind="lib" path="lib/test/jstl.jar"/>
    	<classpathentry kind="lib" path="lib/test/standard.jar"/>
    	<classpathentry kind="lib" path="lib/test/antlr.jar"/>
    	<classpathentry kind="lib" path="lib/test/ojdbc.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/commons-beanutils.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/commons-digester.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/itext.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/jasperreports.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/jfreechart.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/poi.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/servlet.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/sitemesh.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/dwr.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/aopalliance.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/casclient.jar"/>
    	<classpathentry kind="lib" path="lib/test/easymock.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/hibernate.jar"/>
    	<classpathentry kind="lib" path="lib/buildtime/log4j.jar"/>
    	<classpathentry kind="lib" path="lib/global/sqljdbc.jar"/>
    	<classpathentry kind="lib" path="lib/global/commons-fileupload.jar"/>
    	<classpathentry kind="lib" path="lib/global/commons-io.jar"/>
    	<classpathentry kind="lib" path="lib/global/spring-webflow.jar"/>
    	<classpathentry kind="lib" path="lib/global/freemarker.jar"/>
    	<classpathentry kind="lib" path="lib/global/mail.jar"/>
    	<classpathentry kind="lib" path="lib/global/activation.jar"/>
    	<classpathentry kind="lib" path="lib/global/spring-webmvc.jar"/>
    	<classpathentry kind="lib" path="lib/global/acegi-security-catalina.jar"/>
    	<classpathentry kind="lib" path="lib/global/commons-lang.jar"/>
    	<classpathentry kind="lib" path="lib/global/spring-binding.jar"/>
    	<classpathentry kind="lib" path="lib/global/asm.jar"/>
    	<classpathentry kind="lib" path="lib/global/jsp-api.jar"/>
    	<classpathentry kind="lib" path="lib/global/commons-el.jar"/>
    	<classpathentry kind="lib" path="lib/global/jasper-compiler.jar"/>
    	<classpathentry kind="lib" path="lib/global/jasper-compiler-jdt.jar"/>
    	<classpathentry kind="lib" path="lib/global/jasper-runtime.jar"/>
    	<classpathentry kind="lib" path="lib/global/naming-factory.jar"/>
    	<classpathentry kind="lib" path="lib/global/naming-factory-dbcp.jar"/>
    	<classpathentry kind="lib" path="lib/global/naming-resources.jar"/>
    	<classpathentry kind="lib" path="lib/global/aspectjrt.jar"/>
    	<classpathentry kind="lib" path="lib/global/aspectjweaver.jar"/>
    	<classpathentry kind="lib" path="lib/global/taglib-image.jar"/>
    	<classpathentry kind="lib" path="lib/global/commons-javaflow.jar"/>
    	<classpathentry kind="lib" path="lib/global/jxl.jar"/>
    	<classpathentry kind="lib" path="lib/global/asm-commons.jar"/>
    	<classpathentry kind="lib" path="lib/global/asm-util.jar"/>
    	<classpathentry kind="lib" path="lib/global/connector.jar"/>
    	<classpathentry kind="lib" path="lib/global/hibernate-annotations.jar"/>
    	<classpathentry kind="lib" path="lib/global/hibernate-entitymanager.jar"/>
    	<classpathentry kind="lib" path="lib/global/jaxen.jar"/>
    	<classpathentry kind="lib" path="lib/global/cglib-nodep.jar"/>
    	<classpathentry kind="lib" path="lib/global/spring-aspects.jar"/>
    	<classpathentry kind="lib" path="lib/global/jruby.jar"/>
    	<classpathentry kind="lib" path="lib/global/bsh.jar"/>
    	<classpathentry kind="lib" path="lib/global/groovy.jar"/>
    	<classpathentry kind="lib" path="lib/global/ognl.jar"/>
    	<classpathentry kind="lib" path="lib/global/aitworks-utils.jar"/>
    	<classpathentry kind="lib" path="lib/global/jcommon.jar"/>
    	<classpathentry kind="lib" path="lib/global/jfreechart.jar"/>
    	<classpathentry kind="lib" path="lib/global/itext.jar"/>
    	<classpathentry kind="lib" path="lib/global/oro.jar"/>
    	<classpathentry kind="lib" path="lib/global/commons-codec.jar"/>
    	<classpathentry kind="lib" path="lib/global/jasypt.jar"/>
    	<classpathentry kind="lib" path="lib/global/icu4j.jar"/>
    	<classpathentry kind="lib" path="lib/global/spring-test.jar"/>
    	<classpathentry kind="lib" path="lib/global/acegi-security.jar"/>
    	<classpathentry kind="lib" path="lib/global/ehcache.jar"/>
    	<classpathentry kind="lib" path="lib/global/spring.jar"/>
    	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_03"/>
    	<classpathentry kind="output" path="target/classes"/>
    </classpath>
    Any comment would help me out.

    thanks
    ~s.

  • #2
    To me, it looks like you still have an old JAR somewhere ... The AutowireCapableBeanFactory class is found, but the method signature isnt right ... So you probably have the right jar, but from the wrong version ...

    Comment

    Working...
    X