Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] NPE when trying to use Jetty async HTTP client

Hi,

On Sun, Jul 2, 2017 at 4:29 PM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
> Hello Simone, when I have these lines -
>
>     private static final SslContextFactory sFactory = new
> SslContextFactory();
>     private static final HttpClient sHttpClient = new HttpClient(sFactory);
>
> then it works. But when I have
>
>     private static final HttpClient sHttpClient = new HttpClient();
>
> in
> https://github.com/afarber/jetty-newbie/blob/master/FcmNotRegistered/src/main/java/de/afarber/fcmnotregistered/Main.java
>
> then it reports "java.net.NoRouteToHostException: No route to host"
>
> So I should have read the docs more carefully,
> but the reported error seems a bit misleading to me...

It's not an error that is reported by Jetty, it is reported by the
JVM. Jetty only forwards it.
It should not matter whether you use TLS or not, this is a lower level problem.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top