restlet client返回500(测试什么接口都是返回500,一切正常!!!)

来源:6-9 用户模块所有功能自测试

Pertty宅特闷

2017-10-04

数据库数据可以传进去,网页可以正常打开,项目代码没有问题,没有任何问题,就是返回500

http://szimg.mukewang.com/59d49ef1000151a013660732.jpg

http://szimg.mukewang.com/59d49ef10001f04a13660732.jpg

http://szimg.mukewang.com/59d49ef10001a53e13660732.jpg

http://szimg.mukewang.com/59d49ef2000158db13660736.jpg

http://szimg.mukewang.com/59d49ef200014f3713660732.jpg

<html><head><title>Apache Tomcat/7.0.73 - Error report</title><style><!--H1 {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;fontsize:22px;} H2 {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;fontsize:16px;} H3 {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;fontsize:14px;} BODY {fontfamily:Tahoma,Arial,sansserif;color:black;backgroundcolor:white;} B {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;} P {fontfamily:Tahoma,Arial,sansserif;background:white;color:black;fontsize:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()Ljava/lang/Class;</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()Ljava/lang/Class;</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()Ljava/lang/Class; org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1284) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:965) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833) javax.servlet.http.HttpServlet.service(HttpServlet.java:650) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)</pre></p><p><b>root cause</b> <pre>java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()Ljava/lang/Class; org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.supportsReturnType(RequestResponseBodyMethodProcessor.java:83) org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.getReturnValueHandler(HandlerMethodReturnValueHandlerComposite.java:83) org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:69) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:122) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833) javax.servlet.http.HttpServlet.service(HttpServlet.java:650) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.73 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.73</h3></body></html>

写回答

3回答

微风37

2018-04-05

您好!我也是吧代码拉下来测接口都是500,和你的问题一模一样,请问是怎么解决的,谢谢了

1
0

Geely

2017-10-05

no such method 检查一下pom里的包和项目课程是否一致。提示调用了spring包下的那个类。找不大这么个方法


is java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()Ljava/lang/Class;


其他类的接口也是500么?


还是只有user的。


另外你把项目的课程源代码拿下来,跑一下,把配置改对,例如db,跑一下

看看是否都正常哟


0
8
慕的地144258
回复
Geely
老师已经私聊你了 https://coding.imooc.com/learn/questiondetail/42406.html
2018-02-09
共8条回复

Pertty宅特闷

提问者

2017-10-04

代码数据库都测过了,参数都是一样的,配置运行一点毛病都没有,就是返回500

0
3
Geely
回复
慕的地144258
他的错误我知道,是因为他数据库没有开。。。。
2018-02-09
共3条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程