> On 4 Sep 2023, at 21:09, Shawn Heisey <[email protected]> wrote:
>
> On 9/4/23 03:09, Ing. Andrea Vettori wrote:
>> Hello thank you very much for the test program. Your program works. Looking
>> for differences I found that I didn’t have the http2-hpack jar. After adding
>> it to my class path my program also works.
>> I don’t know why a missing jar can cause a timeout instead of a class not
>> found exception but maybe it’s a something pluggable that is however
>> required in this case.
>
> That involves Jetty internals that I don't know much about either. A timeout
> is indeed an odd result from a missing jar, especially one as critical for
> basic H2 operation as that one. It should be reported to the Jetty project
> as a bug. Let me know if you do so ... I will get around to it eventually if
> not.
I tried to create a simple test program
HttpClientTransportOverHTTP2 http2 = new
HttpClientTransportOverHTTP2(new HTTP2Client());
HttpClient httpClient = new HttpClient(http2);
httpClient.setAddressResolutionTimeout(1000L);
httpClient.setConnectTimeout(1000L);
httpClient.setIdleTimeout(1000L);
httpClient.setDestinationIdleTimeout(1000L);
httpClient.start();
ContentResponse response = httpClient.GET("https://www.google.com");
System.out.println(response.toString());
httpClient.stop();
but this doesn’t timeout. I never used jetty client before so I may be doing
something work (BTW with the hpack jar it works and prints the response).
>
> I would strongly recommend using a dependency manager for your Java projects
> so that all required dependencies are included automatically.
>
> As you probably noticed, I built my test program with Gradle. Gradle seems
> to be the hot new kid on the block. I personally find ant+ivy and maven to
> be cumbersome, but they do work. When I first started writing Java programs,
> I used a very simple ant config that I stole from somewhere, with manually
> downloaded jars placed in a lib directory. I don't miss those days!
> Upgrading dependencies was quite painful, now I just edit build.gradle, check
> for code changes that might be required, and recompile.
You are correct and in fact our “core programmers” already use gradle. I mostly
do test of new technologies and test upgrades of systems we use and did not
convert myself to use gradle yet :)
—
Ing. Andrea Vettori
Sistemi Informativi
B2BIres s.r.l.