org.eclipse.jetty.io.EofException

Spring JIRA | lzxianren | 1 year ago
  1. 0

    i am using runjettyrun9.0.0.M3 with eclipse. i have a {{@RestController}} method which return {quote}ResponseEntity{quote},and the body is String. When to return by the framework, there is a eofexption happened. the exception like {code:java} org.eclipse.jetty.io.EofException at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:134) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) at org.springframework.util.StreamUtils.copy(StreamUtils.java:106) at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:109) at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:40) at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:208) at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:161) at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:146) at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:71) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1329) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:231) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213) at org.eclipse.jetty.server.handler.ContextHandler.__doHandle(ContextHandler.java:1054) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:988) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:410) at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:245) at org.eclipse.jetty.server.HttpConnection$1.run(HttpConnection.java:75) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:597) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528) at java.lang.Thread.run(Thread.java:745) {code} i debug the code,and find the code after this may be the reason. {code:java} StreamUtils.copy(str, charset, outputMessage.getBody()); {code} this will call the next code {code:java} public static void copy(String in, Charset charset, OutputStream out) throws IOException { Assert.notNull(in, "No input String specified"); Assert.notNull(charset, "No charset specified"); Assert.notNull(out, "No OutputStream specified"); Writer writer = new OutputStreamWriter(out, charset); writer.write(in); {color:red}writer.flush();{color} } {code} the red line is the bug line. Is spring framework should add eof for stringhttpmsgconvert

    Spring JIRA | 1 year ago | lzxianren
    org.eclipse.jetty.io.EofException
  2. 0

    i am using runjettyrun9.0.0.M3 with eclipse. i have a {{@RestController}} method which return {quote}ResponseEntity{quote},and the body is String. When to return by the framework, there is a eofexption happened. the exception like {code:java} org.eclipse.jetty.io.EofException at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:134) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) at org.springframework.util.StreamUtils.copy(StreamUtils.java:106) at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:109) at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:40) at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:208) at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:161) at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:146) at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:71) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1329) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:231) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213) at org.eclipse.jetty.server.handler.ContextHandler.__doHandle(ContextHandler.java:1054) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:988) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:410) at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:245) at org.eclipse.jetty.server.HttpConnection$1.run(HttpConnection.java:75) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:597) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528) at java.lang.Thread.run(Thread.java:745) {code} i debug the code,and find the code after this may be the reason. {code:java} StreamUtils.copy(str, charset, outputMessage.getBody()); {code} this will call the next code {code:java} public static void copy(String in, Charset charset, OutputStream out) throws IOException { Assert.notNull(in, "No input String specified"); Assert.notNull(charset, "No charset specified"); Assert.notNull(out, "No OutputStream specified"); Writer writer = new OutputStreamWriter(out, charset); writer.write(in); {color:red}writer.flush();{color} } {code} the red line is the bug line. Is spring framework should add eof for stringhttpmsgconvert

    Spring JIRA | 1 year ago | lzxianren
    org.eclipse.jetty.io.EofException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    @ResponseBody results in EofException

    Stack Overflow | 3 years ago | JJensL
    org.eclipse.jetty.io.EofException
  5. 0

    neo4j creating multiple nodes json

    Stack Overflow | 3 years ago | Nipun
    org.eclipse.jetty.io.EofException

  1. tfr 1 times, last 3 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.eclipse.jetty.io.EofException

    No message provided

    at org.eclipse.jetty.server.HttpOutput.flush()
  2. Jetty
    HttpOutput.flush
    1. org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:134)
    1 frame
  3. Java RT
    OutputStreamWriter.flush
    1. sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
    2. sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
    3. java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
    3 frames
  4. Spring Core
    StreamUtils.copy
    1. org.springframework.util.StreamUtils.copy(StreamUtils.java:106)
    1 frame
  5. Spring
    AbstractHttpMessageConverter.write
    1. org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:109)
    2. org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:40)
    3. org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:208)
    3 frames
  6. Spring MVC
    HttpEntityMethodProcessor.handleReturnValue
    1. org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:161)
    2. org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:146)
    2 frames
  7. Spring
    HandlerMethodReturnValueHandlerComposite.handleReturnValue
    1. org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:71)
    1 frame
  8. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
    8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
    8 frames
  9. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
    1 frame
  10. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
    1 frame
  11. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    1 frame
  12. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
    2. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1329)
    2 frames
  13. Hibernate
    OpenSessionInViewFilter.doFilterInternal
    1. org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:231)
    1 frame
  14. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    1 frame
  15. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
    1 frame
  16. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    2 frames
  17. Jetty
    QueuedThreadPool$3.run
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
    2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
    3. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
    4. org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564)
    5. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
    6. org.eclipse.jetty.server.handler.ContextHandler.__doHandle(ContextHandler.java:1054)
    7. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java)
    8. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
    9. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
    10. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:988)
    11. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
    12. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    13. org.eclipse.jetty.server.Server.handle(Server.java:410)
    14. org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:245)
    15. org.eclipse.jetty.server.HttpConnection$1.run(HttpConnection.java:75)
    16. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:597)
    17. org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528)
    17 frames
  18. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame