cognitect-labs / aws-api

AWS, data driven
Apache License 2.0
731 stars 100 forks source link

api 0.8.612 with S3 822.2.1145.0 fails with NoSuchFieldException at cognitect/http_client.clj:39:9 #222

Closed kirked closed 1 year ago

kirked commented 2 years ago

Dependencies

{:deps
 {com.cognitect.aws/api                           {:mvn/version "0.8.612"}
  com.cognitect.aws/endpoints                     {:mvn/version "1.1.12.321"}
  com.cognitect.aws/s3                            {:mvn/version "822.2.1145.0"}
  com.cognitect.aws/sqs                           {:mvn/version "822.2.1109.0"}

  …
  org.eclipse.jetty/jetty-server                  {:mvn/version "11.0.12"}
}

Description with failing test case

user=> (require '[cognitect.aws.client.api :as aws])
nil
user=> (def s3 (doto (aws/client {:api :s3}) (aws/validate-requests true)))
Syntax error (NoSuchFieldException) compiling . at (cognitect/http_client.clj:39:9).
getProperties
Stack trace ```clojure user=> *e #error { :cause "getProperties" :via [{:type clojure.lang.Compiler$CompilerException :message "Syntax error compiling . at (cognitect/http_client.clj:39:9)." :data #:clojure.error{:phase :compile-syntax-check, :line 39, :column 9, :source "cognitect/http_client.clj", :symbol .} :at [clojure.lang.Compiler analyzeSeq "Compiler.java" 7132]} {:type java.lang.NoSuchFieldException :message "getProperties" :at [java.lang.Class getField "Class.java" 2117]}] :trace [[java.lang.Class getField "Class.java" 2117] [clojure.lang.Compiler$StaticFieldExpr "Compiler.java" 1284] [clojure.lang.Compiler$HostExpr$Parser parse "Compiler.java" 1006] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7124] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7112] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler access$300 "Compiler.java" 38] [clojure.lang.Compiler$LetExpr$Parser parse "Compiler.java" 6401] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7124] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7112] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7112] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler analyze "Compiler.java" 6762] [clojure.lang.Compiler$BodyExpr$Parser parse "Compiler.java" 6137] [clojure.lang.Compiler$FnMethod parse "Compiler.java" 5479] [clojure.lang.Compiler$FnExpr parse "Compiler.java" 4041] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7122] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7112] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler access$300 "Compiler.java" 38] [clojure.lang.Compiler$DefExpr$Parser parse "Compiler.java" 596] [clojure.lang.Compiler analyzeSeq "Compiler.java" 7124] [clojure.lang.Compiler analyze "Compiler.java" 6806] [clojure.lang.Compiler analyze "Compiler.java" 6762] [clojure.lang.Compiler eval "Compiler.java" 7198] [clojure.lang.Compiler load "Compiler.java" 7653] [clojure.lang.RT loadResourceScript "RT.java" 381] [clojure.lang.RT loadResourceScript "RT.java" 372] [clojure.lang.RT load "RT.java" 459] [clojure.lang.RT load "RT.java" 424] [clojure.core$load$fn__6908 invoke "core.clj" 6161] [clojure.core$load invokeStatic "core.clj" 6160] [clojure.core$load doInvoke "core.clj" 6144] [clojure.lang.RestFn invoke "RestFn.java" 408] [clojure.core$load_one invokeStatic "core.clj" 5933] [clojure.core$load_one invoke "core.clj" 5928] [clojure.core$load_lib$fn__6850 invoke "core.clj" 5975] [clojure.core$load_lib invokeStatic "core.clj" 5974] [clojure.core$load_lib doInvoke "core.clj" 5953] [clojure.lang.RestFn applyTo "RestFn.java" 142] [clojure.core$apply invokeStatic "core.clj" 669] [clojure.core$load_libs invokeStatic "core.clj" 6016] [clojure.core$load_libs doInvoke "core.clj" 6000] [clojure.lang.RestFn applyTo "RestFn.java" 137] [clojure.core$apply invokeStatic "core.clj" 669] [clojure.core$require invokeStatic "core.clj" 6038] [clojure.core$require doInvoke "core.clj" 6038] [clojure.lang.RestFn invoke "RestFn.java" 421] [cognitect.aws.http.cognitect$eval45309$loading__6789__auto____45310 invoke "cognitect.clj" 4] [cognitect.aws.http.cognitect$eval45309 invokeStatic "cognitect.clj" 4] [cognitect.aws.http.cognitect$eval45309 invoke "cognitect.clj" 4] [clojure.lang.Compiler eval "Compiler.java" 7194] [clojure.lang.Compiler eval "Compiler.java" 7183] [clojure.lang.Compiler load "Compiler.java" 7653] [clojure.lang.RT loadResourceScript "RT.java" 381] [clojure.lang.RT loadResourceScript "RT.java" 372] [clojure.lang.RT load "RT.java" 459] [clojure.lang.RT load "RT.java" 424] [clojure.core$load$fn__6908 invoke "core.clj" 6161] [clojure.core$load invokeStatic "core.clj" 6160] [clojure.core$load doInvoke "core.clj" 6144] [clojure.lang.RestFn invoke "RestFn.java" 408] [clojure.core$load_one invokeStatic "core.clj" 5933] [clojure.core$load_one invoke "core.clj" 5928] [clojure.core$load_lib$fn__6850 invoke "core.clj" 5975] [clojure.core$load_lib invokeStatic "core.clj" 5974] [clojure.core$load_lib doInvoke "core.clj" 5953] [clojure.lang.RestFn applyTo "RestFn.java" 142] [clojure.core$apply invokeStatic "core.clj" 669] [clojure.core$load_libs invokeStatic "core.clj" 6016] [clojure.core$load_libs doInvoke "core.clj" 6000] [clojure.lang.RestFn applyTo "RestFn.java" 137] [clojure.core$apply invokeStatic "core.clj" 669] [clojure.core$require invokeStatic "core.clj" 6038] [clojure.core$require doInvoke "core.clj" 6038] [clojure.lang.RestFn invoke "RestFn.java" 408] [cognitect.aws.dynaload$load_ns invokeStatic "dynaload.clj" 12] [cognitect.aws.dynaload$load_ns invoke "dynaload.clj" 10] [cognitect.aws.dynaload$load_var invokeStatic "dynaload.clj" 18] [cognitect.aws.dynaload$load_var invoke "dynaload.clj" 14] [cognitect.aws.http$resolve_http_client invokeStatic "http.clj" 87] [cognitect.aws.http$resolve_http_client invoke "http.clj" 81] [cognitect.aws.client.shared$fn__29695 invokeStatic "shared.clj" 14] [cognitect.aws.client.shared$fn__29695 invoke "shared.clj" 14] [clojure.lang.Delay deref "Delay.java" 42] [clojure.core$deref invokeStatic "core.clj" 2337] [clojure.core$deref invoke "core.clj" 2323] [cognitect.aws.client.shared$http_client invokeStatic "shared.clj" 22] [cognitect.aws.client.shared$http_client invoke "shared.clj" 22] [cognitect.aws.client.api$client invokeStatic "api.clj" 76] [cognitect.aws.client.api$client invoke "api.clj" 24] [simple_s3$fn__30804 invokeStatic "simple_s3.clj" 25] [simple_s3$fn__30804 invoke "simple_s3.clj" 24] [clojure.lang.Delay deref "Delay.java" 42] [clojure.core$deref invokeStatic "core.clj" 2337] [clojure.core$deref invoke "core.clj" 2323] [clojure.lang.AFn applyToHelper "AFn.java" 154] [clojure.lang.AFn applyTo "AFn.java" 144] [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3714] [clojure.lang.Compiler$DefExpr eval "Compiler.java" 457] [clojure.lang.Compiler eval "Compiler.java" 7199] [clojure.lang.Compiler eval "Compiler.java" 7149] [clojure.core$eval invokeStatic "core.clj" 3215] [clojure.core$eval invoke "core.clj" 3211] [nrepl.middleware.interruptible_eval$evaluate$fn__44210$fn__44211 invoke "interruptible_eval.clj" 87] [clojure.lang.AFn applyToHelper "AFn.java" 152] [clojure.lang.AFn applyTo "AFn.java" 144] [clojure.core$apply invokeStatic "core.clj" 667] [clojure.core$with_bindings_STAR_ invokeStatic "core.clj" 1990] [clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1990] [clojure.lang.RestFn invoke "RestFn.java" 425] [nrepl.middleware.interruptible_eval$evaluate$fn__44210 invoke "interruptible_eval.clj" 87] [clojure.main$repl$read_eval_print__9206$fn__9209 invoke "main.clj" 437] [clojure.main$repl$read_eval_print__9206 invoke "main.clj" 437] [clojure.main$repl$fn__9215 invoke "main.clj" 458] [clojure.main$repl invokeStatic "main.clj" 458] [clojure.main$repl doInvoke "main.clj" 368] [clojure.lang.RestFn invoke "RestFn.java" 1523] [nrepl.middleware.interruptible_eval$evaluate invokeStatic "interruptible_eval.clj" 84] [nrepl.middleware.interruptible_eval$evaluate invoke "interruptible_eval.clj" 56] [nrepl.middleware.interruptible_eval$interruptible_eval$fn__44243$fn__44247 invoke "interruptible_eval.clj" 152] [clojure.lang.AFn run "AFn.java" 22] [nrepl.middleware.session$session_exec$main_loop__44313$fn__44317 invoke "session.clj" 218] [nrepl.middleware.session$session_exec$main_loop__44313 invoke "session.clj" 217] [clojure.lang.AFn run "AFn.java" 22] [java.lang.Thread run "Thread.java" 833]]} ```

JDK 17.0.4.1 if it matters

dchelimsky commented 1 year ago

The problem here is that aws-api uses the cognitect http-client, which depends on jetty 9, which makes it incompatible with the dependency on jetty 11 in your example.

We already have https://github.com/cognitect-labs/aws-api/issues/181 open to address this, so I'm closing this issue.