Hello.

So I followed this tutorial
http://www.eclipse.org/jetty/documentation/current/http-client-api.html#http-client-blocking
and wrote this two lines of code:

HttpClient client = new HttpClient();
ContentResponse response = client.GET("http://127.0.0.1:8080/index.html";);

and I get this exception

java.lang.NullPointerException
        at 
org.eclipse.jetty.client.HttpDestination.<init>(HttpDestination.java:61)
        at
org.eclipse.jetty.client.PoolingHttpDestination.<init>(PoolingHttpDestination.java:35)
        at
org.eclipse.jetty.client.http.HttpDestinationOverHTTP.<init>(HttpDestinationOverHTTP.java:30)
        at
org.eclipse.jetty.client.http.HttpClientTransportOverHTTP.newHttpDestination(HttpClientTransportOverHTTP.java:46)
        at 
org.eclipse.jetty.client.HttpClient.destinationFor(HttpClient.java:451)
        at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:481)
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:606)
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:571)
        at org.eclipse.jetty.client.HttpClient.GET(HttpClient.java:327)
        at org.eclipse.jetty.client.HttpClient.GET(HttpClient.java:315)
        ...

HttpDestination.java:61 on github has this line:

this.exchanges = new
BlockingArrayQueue<>(client.getMaxRequestsQueuedPerDestination());

so the client is null? but this is stable build from
http://download.eclipse.org/jetty/stable-9/dist/, can't possibly have things
like this broken?



--
View this message in context: 
http://jetty.4.x6.nabble.com/Weird-exception-in-HttpDestination-tp4962185.html
Sent from the Jetty User mailing list archive at Nabble.com.
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to