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

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...

Regards
Alex


On Sun, Jul 2, 2017 at 3:49 PM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
Hi,

On Sat, Jul 1, 2017 at 4:45 PM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
> Hello again,
>
> I have change my code to the following, but for some reason it returns
>
> java.net.NoRouteToHostException: No route to host

It's what it says: there is no network.

Nothing that Jetty's HttpClient can do, apart reporting the exception.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top