当前位置: 代码迷 >> 综合 >> 控制台报错: java.lang.IllegalStateException: getOutputStream() has already been called for this response.
  详细解决方案

控制台报错: java.lang.IllegalStateException: getOutputStream() has already been called for this response.

热度:65   发布时间:2023-12-04 05:15:32.0

1、错误描述


   
  1. Caused by: java .lang .IllegalStateException: getOutputStream() has already been called for this response
  2. at org .apache .catalina .connector .Response .getWriter( Response .java :648)
  3. at org .apache .catalina .connector .ResponseFacade .getWriter( ResponseFacade .java :213)
  4. at javax .servlet .ServletResponseWrapper .getWriter( ServletResponseWrapper .java :104)
  5. at exception .ExceptionHandler .resolveException( ExceptionHandler .java :47)
  6. at org .springframework .web .servlet .DispatcherServlet .processHandlerException( DispatcherServlet .java :1161)
  7. at org .springframework .web .servlet .DispatcherServlet .processDispatchResult( DispatcherServlet .java :998)
  8. at org .springframework .web .servlet .DispatcherServlet .doDispatch( DispatcherServlet .java :952)
  9. at org .springframework .web .servlet .DispatcherServlet .doService( DispatcherServlet .java :870)
  10. at org .springframework .web .servlet .FrameworkServlet .processRequest( FrameworkServlet .java :961)
  11. ... 50 more

2、错误原因

     由于启动eclipse项目时,无法暂时连接远程数据库服务器,出现这个错误


3、解决办法

(1)检查数据库服务器连接情况

(2)重新启动项目


  相关解决方案