安卓调用后台下载时报错,文件可正常下载打开

2019-05-29 13:10:47
  • 代码
  1. def doDownLoad(HttpServletResponse response, File file, String fileName, String encoding) {
  2. if (!file.exists()) {
  3. return false
  4. }
  5. BufferedInputStream bis = null
  6. BufferedOutputStream bos = null
  7. try {
  8. bis = new BufferedInputStream(new FileInputStream(file))
  9. bos = new BufferedOutputStream(response.getOutputStream())
  10. response.setContentType("application/octet-stream;charset=" + encoding)
  11. // response.setCharacterEncoding(encoding)
  12. // response.setContentLength(bis.available())
  13. response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, encoding))
  14. byte[] buffer = new byte[1024]
  15. int len
  16. while ((len = bis.read(buffer)) > 0) {
  17. bos.write(buffer, 0, len)
  18. bos.flush()
  19. }
  20. } catch (e) {
  21. e.printStackTrace()
  22. } finally {
  23. if (bis) {
  24. bis.close()
  25. }
  26. if (bos) {
  27. bos.close()
  28. }
  29. }
  30. }
  • 错误提示

  • 完整版
  1. org.apache.catalina.connector.ClientAbortException: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
  2. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
  3. at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
  4. at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)
  5. at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:317)
  6. at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:110)
  7. at org.springframework.security.web.context.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:437)
  8. at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
  9. at java_io_Flushable$flush.call(Unknown Source)
  10. at com.file.FileDownLoadService$$ERRpgbah.doDownLoad(FileDownLoadService.groovy:47)
  11. at com.file.FileDownLoadService$$DRRpgbah.doDownLoad(Unknown Source)
  12. at com.file.FileDownLoadService.doDownLoad(FileDownLoadService.groovy)
  13. at com.file.FileDownLoadService$doDownLoad.call(Unknown Source)
  14. at com.userBase.FileDownloadController$$ERRpVHGG.$tt__dowloadUuid(FileDownloadController.groovy:178)
  15. at com.userBase.FileDownloadController$$DRRpVHGG.$tt__dowloadUuid(Unknown Source)
  16. at com.userBase.FileDownloadController.$tt__dowloadUuid(FileDownloadController.groovy)
  17. at com.userBase.FileDownloadController$_dowloadUuid_closure8$$ERRpVHGM.doCall(FileDownloadController.groovy)
  18. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  19. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  20. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  21. at java.lang.reflect.Method.invoke(Method.java:498)
  22. at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:133)
  23. at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1461)
  24. at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
  25. at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
  26. at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
  27. at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
  28. at groovy.lang.Closure.call(Closure.java:426)
  29. at com.userBase.FileDownloadController$_dowloadUuid_closure8.call(FileDownloadController.groovy)
  30. at groovy.lang.Closure.call(Closure.java:442)
  31. at com.userBase.FileDownloadController$_dowloadUuid_closure8.call(FileDownloadController.groovy)
  32. at grails.transaction.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:96)
  33. at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
  34. at grails.transaction.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:93)
  35. at com.userBase.FileDownloadController$$ERRpVHGG.dowloadUuid(FileDownloadController.groovy)
  36. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  37. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  38. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  39. at java.lang.reflect.Method.invoke(Method.java:498)
  40. at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:133)
  41. at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1461)
  42. at org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker.invoke(DefaultGrailsControllerClass.java:210)
  43. at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:187)
  44. at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:87)
  45. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
  46. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
  47. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
  48. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859)
  49. at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
  50. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
  51. at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  52. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
  53. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  54. at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  55. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  56. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  57. at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:237)
  58. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  59. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  60. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  61. at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:112)
  62. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  63. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  64. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  65. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
  66. at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
  67. at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
  68. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  69. at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
  70. at grails.plugin.springsecurity.web.UpdateRequestContextHolderExceptionTranslationFilter.doFilter(UpdateRequestContextHolderExceptionTranslationFilter.groovy:64)
  71. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  72. at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.groovy:53)
  73. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  74. at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:149)
  75. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  76. at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
  77. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  78. at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
  79. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  80. at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.groovy:62)
  81. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  82. at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
  83. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  84. at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.groovy:58)
  85. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  86. at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
  87. at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
  88. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  89. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  90. at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:75)
  91. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  92. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  93. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  94. at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
  95. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  96. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  97. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  98. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
  99. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  100. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  101. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  102. at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:103)
  103. 13:09:03.652 | [http-nio-8080-exec-9] ERROR | com.userBase.FileDownloadController186 - 文件下载失败,errorMsg={}
  104. org.apache.catalina.connector.ClientAbortException: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
  105. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
  106. at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
  107. at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)
  108. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  109. at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:317)
  110. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  111. at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:110)
  112. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  113. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
  114. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
  115. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
  116. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
  117. at org.springframework.security.web.context.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:437)
  118. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
  119. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
  120. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
  121. at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
  122. at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
  123. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
  124. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
  125. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  126. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  127. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  128. at java.lang.Thread.run(Thread.java:748)
  129. Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
  130. at sun.nio.ch.SocketDispatcher.write0(Native Method)
  131. at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
  132. at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
  133. at sun.nio.ch.IOUtil.write(IOUtil.java:65)
  134. at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
  135. at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124)
  136. at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
  137. at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
  138. at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
  139. at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
  140. at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
  141. at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
  142. at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
  143. at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
  144. at org.apache.coyote.Response.doWrite(Response.java:501)
  145. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
  146. ... 118 more
  147. at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
  148. at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
  149. at java_io_Closeable$close.call(Unknown Source)
  150. at com.file.FileDownLoadService$$ERRpgbah.doDownLoad(FileDownLoadService.groovy:56)
  151. at com.file.FileDownLoadService$$DRRpgbah.doDownLoad(Unknown Source)
  152. at com.file.FileDownLoadService.doDownLoad(FileDownLoadService.groovy)
  153. at com.file.FileDownLoadService$doDownLoad.call(Unknown Source)
  154. at com.userBase.FileDownloadController$$ERRpVHGG.$tt__dowloadUuid(FileDownloadController.groovy:178)
  155. at com.userBase.FileDownloadController$$DRRpVHGG.$tt__dowloadUuid(Unknown Source)
  156. at com.userBase.FileDownloadController.$tt__dowloadUuid(FileDownloadController.groovy)
  157. at com.userBase.FileDownloadController$_dowloadUuid_closure8$$ERRpVHGM.doCall(FileDownloadController.groovy)
  158. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  159. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  160. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  161. at java.lang.reflect.Method.invoke(Method.java:498)
  162. at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:133)
  163. at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1461)
  164. at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
  165. at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
  166. at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
  167. at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
  168. at groovy.lang.Closure.call(Closure.java:426)
  169. at com.userBase.FileDownloadController$_dowloadUuid_closure8.call(FileDownloadController.groovy)
  170. at groovy.lang.Closure.call(Closure.java:442)
  171. at com.userBase.FileDownloadController$_dowloadUuid_closure8.call(FileDownloadController.groovy)
  172. at grails.transaction.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:96)
  173. at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
  174. at grails.transaction.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:93)
  175. at com.userBase.FileDownloadController$$ERRpVHGG.dowloadUuid(FileDownloadController.groovy)
  176. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  177. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  178. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  179. at java.lang.reflect.Method.invoke(Method.java:498)
  180. at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:133)
  181. at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1461)
  182. at org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker.invoke(DefaultGrailsControllerClass.java:210)
  183. at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:187)
  184. at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:87)
  185. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
  186. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
  187. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
  188. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859)
  189. at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
  190. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
  191. at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  192. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
  193. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  194. at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  195. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  196. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  197. at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:237)
  198. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  199. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  200. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  201. at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:112)
  202. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  203. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  204. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  205. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
  206. at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
  207. at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
  208. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  209. at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
  210. at grails.plugin.springsecurity.web.UpdateRequestContextHolderExceptionTranslationFilter.doFilter(UpdateRequestContextHolderExceptionTranslationFilter.groovy:64)
  211. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  212. at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.groovy:53)
  213. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  214. at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:149)
  215. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  216. at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
  217. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  218. at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
  219. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  220. at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.groovy:62)
  221. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  222. at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
  223. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  224. at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.groovy:58)
  225. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  226. at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
  227. at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
  228. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  229. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  230. at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:75)
  231. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  232. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  233. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  234. at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
  235. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  236. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  237. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  238. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
  239. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  240. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  241. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  242. at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:103)
  243. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  244. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  245. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  246. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
  247. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
  248. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
  249. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
  250. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
  251. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
  252. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
  253. at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
  254. at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
  255. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
  256. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
  257. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  258. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  259. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  260. at java.lang.Thread.run(Thread.java:748)
  261. Suppressed: org.apache.catalina.connector.ClientAbortException: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
  262. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
  263. at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
  264. at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)
  265. at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:295)
  266. at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:151)
  267. at org.springframework.security.web.context.OnCommittedResponseWrapper$SaveContextServletOutputStream.close(OnCommittedResponseWrapper.java:442)
  268. at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
  269. ... 112 common frames omitted
  270. Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
  271. at sun.nio.ch.SocketDispatcher.write0(Native Method)
  272. at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
  273. at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
  274. at sun.nio.ch.IOUtil.write(IOUtil.java:65)
  275. at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
  276. at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124)
  277. at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
  278. at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
  279. at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
  280. at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:244)
  281. at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189)
  282. at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
  283. at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
  284. at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:116)
  285. at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
  286. at org.apache.coyote.Response.doWrite(Response.java:501)
  287. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
  288. ... 118 common frames omitted
  289. Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
  290. at sun.nio.ch.SocketDispatcher.write0(Native Method)
  291. at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
  292. at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
  293. at sun.nio.ch.IOUtil.write(IOUtil.java:65)
  294. at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
  295. at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124)
  296. at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
  297. at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
  298. at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
  299. at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:244)
  300. at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189)
  301. at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
  302. at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
  303. at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:116)
  304. at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
  305. at org.apache.coyote.Response.doWrite(Response.java:501)
  306. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
  307. ... 119 common frames omitted

0
0
0

添加评论

正在回复:
取消
0
0
0
0