Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] InputStreamContentProvider wrapping exceptions

InputStreamContentProviderIterator.next() wraps failures in a NoSuchElementException, presumably because it can't throw an IOException. Unfortunately, this tends to obscure the real failure.

Would it make sense for ContentCallback.process() to unwrap the NoSuchElementException when it has a cause?

java.util.NoSuchElementException: null
at org.eclipse.jetty.client.util.InputStreamContentProvider$InputStreamContentProviderIterator.next(InputStreamContentProvider.java:231) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.util.InputStreamContentProvider$InputStreamContentProviderIterator.next(InputStreamContentProvider.java:166) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpContent.advance(HttpContent.java:139) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpSender$ContentCallback.process(HttpSender.java:755) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpSender$CommitCallback.process(HttpSender.java:694) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpSender$CommitCallback.succeeded(HttpSender.java:644) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpSenderOverHTTP$ByteBufferRecyclerCallback.succeeded(HttpSenderOverHTTP.java:238) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:321) ~[jetty-io-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129) ~[jetty-io-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpSenderOverHTTP.sendHeaders(HttpSenderOverHTTP.java:108) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpSender.send(HttpSender.java:183) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpChannelOverHTTP.send(HttpChannelOverHTTP.java:64) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpConnectionOverHTTP$Delegate.send(HttpConnectionOverHTTP.java:188) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.send(HttpConnectionOverHTTP.java:75) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.send(HttpDestinationOverHTTP.java:36) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.send(HttpDestinationOverHTTP.java:26) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.PoolingHttpDestination.process(PoolingHttpDestination.java:138) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.PoolingHttpDestination.send(PoolingHttpDestination.java:73) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:187) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:518) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:682) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:675) ~[jetty-client-9.2.9.v20150224.jar:9.2.9.v20150224] at com.proofpoint.http.client.jetty.JettyHttpClient.execute(JettyHttpClient.java:214) ~[http-client-1.15.jar:na] at com.proofpoint.http.client.balancing.BalancingHttpClient.execute(BalancingHttpClient.java:96) ~[http-client-1.15.jar:na]
[...elided...]
Caused by: org.eclipse.jetty.io.EofException: Early EOF
at org.eclipse.jetty.server.HttpInput$3.noContent(HttpInput.java:505) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:124) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224] at org.glassfish.jersey.message.internal.EntityInputStream.read(EntityInputStream.java:101) ~[jersey-common-2.13.jar:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream.read(ReaderInterceptorExecutor.java:300) ~[jersey-common-2.13.jar:na] at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[na:1.7.0_75]
[...elided...]



Back to the top