0
Java Webアプリケーション(Spring MVCを使用)はTomcatではうまく動作しますが、Bluemix Cloud Foundryではうまく動作しません。各HTTPリクエストの後、次のメッセージがログに存在し、応答がメソッド呼び出し後に返されません。Bluemixクラウドファウンドリーjava app例外:OutputStream already closed
例外:OutputStreamのは、すでに
任意のアイデアを閉じましたか?
ログファイル:ローカルで開発してTomcatを使用している場合
3/5/2017 7:56:00 AM ERR APP [ERROR ] SRVE0777E: Exception thrown by application class 'com.ibm.ws.http.channel.internal.outbound.HttpOutputStreamImpl.validate:210'
3/5/2017 7:56:00 AM ERR APP java.io.IOException: Stream is closed
3/5/2017 7:56:00 AM ERR APP at com.ibm.ws.http.channel.internal.outbound.HttpOutputStreamImpl.validate(HttpOutputStreamImpl.java:210)
3/5/2017 7:56:00 AM ERR APP at [internal classes]
3/5/2017 7:56:00 AM ERR APP at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:101)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:231)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:174)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:81)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:132)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
3/5/2017 7:56:00 AM ERR APP at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
3/5/2017 7:56:00 AM ERR APP at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
3/5/2017 7:56:00 AM ERR APP at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
3/5/2017 7:56:00 AM ERR APP at [internal classes]
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
3/5/2017 7:56:00 AM ERR APP at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
3/5/2017 7:56:00 AM ERR APP at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
3/5/2017 7:56:00 AM ERR APP at [internal classes]
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
3/5/2017 7:56:00 AM ERR APP at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
3/5/2017 7:56:00 AM ERR APP at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
3/5/2017 7:56:00 AM ERR APP at [internal classes]
3/5/2017 7:56:00 AM OUT APP [WARNING ] WARNING: Cannot set status. Response already committed.
3/5/2017 7:56:00 AM ERR APP [ERROR ] Error Page Exception:
3/5/2017 7:56:00 AM ERR APP myapp
3/5/2017 7:56:00 AM ERR APP/
3/5/2017 7:56:00 AM ERR APP Error Page Exception
3/5/2017 7:56:00 AM ERR APP com.ibm.ws.webcontainer.webapp.WebAppErrorReport: java.io.IOException: Stream is closed
3/5/2017 7:56:00 AM ERR APP at com.ibm.ws.http.channel.internal.outbound.HttpOutputStreamImpl.validate(HttpOutputStreamImpl.java:210)
3/5/2017 7:56:00 AM ERR APP at [internal classes]
3/5/2017 7:56:00 AM ERR APP Caused by: java.io.IOException: Stream is closed
3/5/2017 7:56:00 AM ERR APP ... 3 more
を、これはそれがあるときに起こるようですログによるとTomcatを使用したい場合は、このようなプリインストールされている
java_buildpack
buildpackを使用エラーページを表示しようとしています。つまり、元の問題に加えて、エラー処理にも問題があります。 – Henryhttps://stackoverflow.com/questions/1829784/should-i-close-the-servlet-outputstreamの複製のように聞こえます - あなたは応答出力ストリームを閉じるサーブレットコードを持っていますか? – hugh
@Henry報告された例外の前にエラーが発生していません。 Tnx – Premier