HTTP状态 500 - 内部服务器错误

2021-02-12 05:16

阅读:379

标签:native   err   启动   ati   ssi   ack   nested   request   不能   

搭建SSM小demo,运行的时候页面显示如下500错误:

 

HTTP状态 500 - 内部服务器错误


类型 异常报告

消息 Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.kuang.dao.BookMapper.queryAllBook

描述 服务器遇到一个意外的情况,阻止它完成请求。

例外情况

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.kuang.dao.BookMapper.queryAllBook
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1013)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)

根本原因。

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.kuang.dao.BookMapper.queryAllBook
	org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:235)
	org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:53)
	org.apache.ibatis.binding.MapperProxy.lambda$cachedMapperMethod$0(MapperProxy.java:61)
	java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:61)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:56)
	com.sun.proxy.$Proxy17.queryAllBook(Unknown Source)
	com.kuang.service.BookServiceImpl.queryAllBook(BookServiceImpl.java:35)
	com.kuang.controller.BookController.list(BookController.java:25)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)

):注意 主要问题的全部 stack 信息可以在 server logs 里查看


Apache Tomcat/8.5.61

 

解决方式如下:

1.在pom.xml文件里面加入下面这段代码:

 


指定使用UTF-8
UTF-8

 

 

2.其次到idea右侧的maven中的Lifecycle目录下点击clean,然后再点击一下install,

以上两步骤弄好之后可以重新启动项目试一试,看看能不能行,不行也没关系,到别的

博客试试别的方法。

 

HTTP状态 500 - 内部服务器错误

标签:native   err   启动   ati   ssi   ack   nested   request   不能   

原文地址:https://www.cnblogs.com/sensen666/p/14395087.html


评论


亲,登录后才可以留言!