日期:2014-05-19  浏览次数:20755 次

分析过Spring自带的petclinic实例的请进
我正在分析Spring自带的实例petclinic项目....当我登录主页的时候,是导向welcome.jsp页面,,但总是出现下列问题...
我希望专家,高手位能够给我解答疑惑。。我也希望研究过或正在研究这个实例的朋友位,把你们的问题或经验贴上了。咱们一块进步,一块研究Spring,,,,好吗?

  javax.servlet.ServletException: Servlet.init() for servlet petclinic threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
java.lang.Thread.run(Unknown Source)


root cause 

java.lang.NoSuchMethodError: org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope(Ljava/lang/String;Lorg/springframework/beans/factory/config/Scope;)V
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.postProcessBeanFactory(AbstractRefreshableWebApplicationContext.java:174)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:277)
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
java.lang.Thread.run(Unknown Source)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.



------解决方案--------------------
java.lang.NoSuchMethodError: org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope


十分常见的错误,缺少方法,一般来说是版本不匹配问题