springMVC+mybatis整合项目中,controller中调用service方法,出现的问题;这个怎么解决?
HTTPStatus500-Handlerprocessingfailed;nestedexceptionisjava.lang.NoSuchMethodError:sy...
HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoSuchMethodError: sy.service.UserService.getAll3()Ljava/util/List;
type Exception report
message Handler processing failed; nested exception is java.lang.NoSuchMethodError: sy.service.UserService.getAll3()Ljava/util/List;
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: sy.service.UserService.getAll3()Ljava/util/List;
org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1259)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 展开
type Exception report
message Handler processing failed; nested exception is java.lang.NoSuchMethodError: sy.service.UserService.getAll3()Ljava/util/List;
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: sy.service.UserService.getAll3()Ljava/util/List;
org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1259)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 展开
4个回答
展开全部
文本 xml 中的filter 有问题吧
追问
public interface UserService {
public List getAll3();
public User getUserById();
}
这是service,我调用getUserById(String id)这个方法能成功,其他方法都报这个错,
追答
spring 的注入 有问题吗 ?? 用得到的类 都要注入啊
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
NoSuchMethodError: sy.service.UserService.getAll3()Ljava/util/List;没有该方法
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
没有找到service中getAll3() 返回值为List的方法;java.lang.NoSuchMethodError 访法不匹配
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询