0

下面是错误的堆栈跟踪:类型异常报告

信息

描述 服务器遇到一个内部错误 () 阻止它完成这个请求。

例外

javax.servlet.ServletException: Servlet.init() for servlet spring threw exception
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    java.lang.Thread.run(Unknown Source)


root cause 

java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resolveTypeArguments(Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/Class;
    org.springframework.core.convert.support.GenericConversionService.getRequiredTypeInfo(GenericConversionService.java:260)
    org.springframework.core.convert.support.GenericConversionService.addConverter(GenericConversionService.java:83)
    org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:63)
    org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:54)
    org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:43)
    org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:41)
    org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:41)
    org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:98)
    org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
    org.springframework.web.context.support.StandardServletEnvironment.<init>(StandardServletEnvironment.java:44)
    org.springframework.web.servlet.HttpServletBean.createEnvironment(HttpServletBean.java:213)
    org.springframework.web.servlet.HttpServletBean.getEnvironment(HttpServletBean.java:203)
    org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    javax.servlet.GenericServlet.init(GenericServlet.java:212)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    java.lang.Thread.run(Unknown Source)

作为 MVC 架构和 spring 的新手......需要帮助来解决这个问题!

4

1 回答 1

1

java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resolveTypeArguments(Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/Class;

我想你刚刚部署在一个服务器上,其中 spring-core 版本的 jar 与你编译的那个不同。检查服务器 spring-core.jar 很可能 GenericTypeResolver.resolveTypeArguments 有 Method 作为第一个参数而不是 Class 因此你的异常

于 2013-09-12T07:43:26.733 回答