記一次在Tomcat部署項目後沒法啓動該項目的例子

  在一次正常部署後,發如今Tomcat的管理中沒法將該項目啓動起來,並在Tomcat的日誌文件localhost.log中發現如下錯誤信息:java

 1 java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resolveTypeArguments(Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/Class;  2     org.springframework.core.convert.support.GenericConversionService.getRequiredTypeInfo(GenericConversionService.java:260)  3     org.springframework.core.convert.support.GenericConversionService.addConverter(GenericConversionService.java:83)  4     org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:63)  5     org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:54)  6     org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:43)  7     org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:41)  8     org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:41)  9     org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:98) 10     org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54) 11     org.springframework.web.context.support.StandardServletEnvironment.<init>(StandardServletEnvironment.java:44) 12     org.springframework.web.servlet.HttpServletBean.createEnvironment(HttpServletBean.java:213) 13     org.springframework.web.servlet.HttpServletBean.getEnvironment(HttpServletBean.java:203) 14     org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126) 15     javax.servlet.GenericServlet.init(GenericServlet.java:212) 16     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 17     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 18     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) 19     org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) 20     org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 21     java.lang.Thread.run(Unknown Source)

  後來發現是我在新的MyEclipse中導入了更新的Spring包 3.1.2.RELEASE ,而與我本身項目使用的Spring3.0的包衝突,所以致使如上問題的發生。web

  因此之後若是一個項目在本身IDE中能部署並正常運行,而到服務器中部署沒法啓動,極可能是庫之間有版本不一樣的包致使的衝突。spring

相關文章
相關標籤/搜索