Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No matching field found: close for class java.util.concurrent.CompletableFuture (client side). #81

Open
jsulmont opened this issue Feb 26, 2021 · 0 comments

Comments

@jsulmont
Copy link

jsulmont commented Feb 26, 2021

Greetings everyone.

Thanks a lot for this cool project, very useful indeed. I have encountered the following client side issue:

summary

  • The problem happens, when a gRPC client calls invoke on an HTTP2Provider that's been reclaimed by Jetty due to idle timeout expiry (30 seconds unless otherwise requested).
  • invoke tries to call .close (here) on the stream (CompletableFuture) which is not a Closable.

how to reproduce

Following the instructions provided in the Quick Start,

  1. first setup the gRPC service, then
  2. setup the gRPC client, then
  3. wait at least 30 seconds (which is the default idle timeout on jetty's HTTP2Client), then
  4. try and execute a request using that client:
user=>  @(greeter/Hello client {:name "Janet Johnathan Doe"})
Feb 26, 2021 8:31:45 AM clojure.tools.logging$eval12569$fn__12572 invoke
SEVERE: GRPC failed: #error {
 :cause No matching field found: close for class java.util.concurrent.CompletableFuture
 :via
 [{:type java.lang.IllegalArgumentException
   :message No matching field found: close for class java.util.concurrent.CompletableFuture
   :at [clojure.lang.Reflector getInstanceField Reflector.java 397]}]

Please note, that the following Reflection warnings when requesting protojure.grpc.client.providers.http2:

user=> (require '[protojure.grpc.client.providers.http2 :as grpc.http2])
Reflection warning, protojure/grpc/codec/lpm.clj:171:5 - reference to field close can't be resolved.
Reflection warning, protojure/internal/grpc/client/providers/http2/core.clj:145:44 - reference to field close can't be resolved.
....

and also:

Reflection warning, protojure/pedestal/core.clj:233:3 - reference to field getPeerAddress can't be resolved.

when requesting protojure.pedestal.core.

On my spare time, I am happy to investigate further and submit a PR, let me know,

Thanks again,

@jsulmont jsulmont changed the title Client side exception: No matching field found: close for class java.util.concurrent.CompletableFuture No matching field found: close for class java.util.concurrent.CompletableFuture (client side). Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant