liquidz / antq

Point out your outdated dependencies.
Other
407 stars 26 forks source link

"Execution error (InstantiationError) at cognitect.http-client/ssl-context-factory #123

Open eneroth opened 2 years ago

eneroth commented 2 years ago

When running,

clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}}' -M -m antq.core

I get the following error:

{:clojure.main/message "Execution error (InstantiationError) at cognitect.http-client/ssl-context-factory (http_client.clj:253).\norg.eclipse.jetty.util.ssl.SslContextFactory\n"
 :clojure.main/triage  {:clojure.error/class  java.lang.InstantiationError
                        :clojure.error/line   253
                        :clojure.error/cause  "org.eclipse.jetty.util.ssl.SslContextFactory"
                        :clojure.error/symbol cognitect.http-client/ssl-context-factory
                        :clojure.error/source "http_client.clj"
                        :clojure.error/phase  :execution}
 :clojure.main/trace   {:via   [{:type    java.util.concurrent.ExecutionException
                                 :message "java.util.concurrent.ExecutionException: java.lang.InstantiationError: org.eclipse.jetty.util.ssl.SslContextFactory"
                                 :at      [java.util.concurrent.FutureTask report "FutureTask.java" 122]}
                                {:type    java.util.concurrent.ExecutionException
                                 :message "java.lang.InstantiationError: org.eclipse.jetty.util.ssl.SslContextFactory"
                                 :at      [java.util.concurrent.FutureTask report "FutureTask.java" 122]}
                                {:type    java.lang.InstantiationError
                                 :message "org.eclipse.jetty.util.ssl.SslContextFactory"
                                 :at      [cognitect.http_client$ssl_context_factory
                                           invokeStatic
                                           "http_client.clj"
                                           253]}]
                        :trace [[cognitect.http_client$ssl_context_factory invokeStatic "http_client.clj" 253]
                                [cognitect.http_client$ssl_context_factory invoke "http_client.clj" 253]
                                [cognitect.http_client$create invokeStatic "http_client.clj" 291]
                                [cognitect.http_client$create invoke "http_client.clj" 270]
                                [cognitect.aws.http.cognitect$create invokeStatic "cognitect.clj" 9]
                                [cognitect.aws.http.cognitect$create invoke "cognitect.clj" 7]
                                [cognitect.aws.http$resolve_http_client invokeStatic "http.clj" 85]
                                [cognitect.aws.http$resolve_http_client invoke "http.clj" 78]
                                [cognitect.aws.client.shared$fn__17638 invokeStatic "shared.clj" 11]
                                [cognitect.aws.client.shared$fn__17638 invoke "shared.clj" 11]
                                [clojure.lang.Delay deref "Delay.java" 42]
                                [clojure.core$deref invokeStatic "core.clj" 2324]
                                [clojure.core$deref invoke "core.clj" 2310]
                                [cognitect.aws.client.shared$http_client invokeStatic "shared.clj" 19]
                                [cognitect.aws.client.shared$http_client invoke "shared.clj" 19]
                                [cognitect.aws.client.api$client invokeStatic "api.clj" 79]
                                [cognitect.aws.client.api$client invoke "api.clj" 26]
                                [clojure.tools.deps.alpha.util.s3_transporter$get_bucket_loc invokeStatic "s3_transporter.clj" 77]
                                [clojure.tools.deps.alpha.util.s3_transporter$get_bucket_loc invoke "s3_transporter.clj" 75]
                                [clojure.tools.deps.alpha.util.s3_transporter$new_transporter$fn__17855
                                 invoke
                                 "s3_transporter.clj"
                                 106]
                                [clojure.tools.deps.alpha.util.session$retrieve$reify__357
                                 apply
                                 "session.clj"
                                 28]
                                [java.util.concurrent.ConcurrentHashMap
                                 computeIfAbsent
                                 "ConcurrentHashMap.java"
                                 1705]
                                [clojure.tools.deps.alpha.util.session$retrieve
                                 invokeStatic
                                 "session.clj"
                                 25]
                                [clojure.tools.deps.alpha.util.session$retrieve
                                 invoke
                                 "session.clj"
                                 18]
                                [clojure.tools.deps.alpha.util.s3_transporter$new_transporter
                                 invokeStatic
                                 "s3_transporter.clj"
                                 90]
                                [clojure.tools.deps.alpha.util.s3_transporter$new_transporter
                                 invoke
                                 "s3_transporter.clj"
                                 88]
                                [clojure.lang.Var invoke "Var.java" 388]
                                [clojure.tools.deps.alpha.util.S3TransporterFactory
                                 newInstance
                                 "S3TransporterFactory.java"
                                 57]
                                [org.eclipse.aether.internal.impl.DefaultTransporterProvider
                                 newTransporter
                                 "DefaultTransporterProvider.java"
                                 104]
                                [org.eclipse.aether.connector.basic.BasicRepositoryConnector
                                 <init>
                                 "BasicRepositoryConnector.java"
                                 129]
                                [org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory
                                 newInstance
                                 "BasicRepositoryConnectorFactory.java"
                                 155]
                                [org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider
                                 newRepositoryConnector
                                 "DefaultRepositoryConnectorProvider.java"
                                 107]
                                [org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask
                                 run
                                 "DefaultMetadataResolver.java"
                                 584]
                                [org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1
                                 run
                                 "RunnableErrorForwarder.java"
                                 75]
                                [java.util.concurrent.ThreadPoolExecutor
                                 runWorker
                                 "ThreadPoolExecutor.java"
                                 1128]
                                [java.util.concurrent.ThreadPoolExecutor$Worker
                                 run
                                 "ThreadPoolExecutor.java"
                                 628]
                                [java.lang.Thread run "Thread.java" 829]]
                        :cause "org.eclipse.jetty.util.ssl.SslContextFactory"}}

This does not happen when it's installed as a tool.

liquidz commented 2 years ago

@eneroth Thanks for your reporting!

Hmm, I cannot reproduce the problem. Could you tell me your deps.edn/project.clj if you can?

eneroth commented 2 years ago

Sure!

{:paths          ["src" "resources"]

 :mvn/local-repo ".m2/repository"

 :deps           {;; Core
                  org.clojure/clojure                 {:mvn/version "1.10.3"}
                  org.clojure/clojurescript           {:mvn/version "1.10.893"}
                  org.clojure/core.async              {:mvn/version "1.4.627"}
                  org.clojure/core.match              {:mvn/version "1.0.0"}
                  org.clojure/tools.namespace         {:mvn/version "1.1.0"}

                  ;; App
                  borkdude/sci                        {:mvn/version "0.2.7"}
                  clj-commons/pushy                   {:mvn/version "0.3.10"}
                  cljs-ajax/cljs-ajax                 {:mvn/version "0.8.4"}
                  com.taoensso/sente                  {;:mvn/version "1.16.2"
                                                       :git/url "git@github.com:fluent-development/sente.git"
                                                       :sha     "64274b5d440f46cba046631299c1af9eeb104e3f"}
                  day8.re-frame/http-fx               {:mvn/version "0.2.3"}
                  day8.re-frame/tracing               {:mvn/version "0.6.2"}
                  integrant/integrant                 {:mvn/version "0.8.0"}
                  re-frame/re-frame                   {:mvn/version "1.2.0"
                                                       :exclusions  [reagent/reagent
                                                                     cljsjs/react-dom-server
                                                                     cljsjs/react-dom
                                                                     cljsjs/react]}
                  re-promise/re-promise               {:mvn/version "0.1.1"}
                  reagent/reagent                     {:mvn/version "1.1.0"}
                  thheller/shadow-cljs                {:mvn/version "2.16.5"}

                  ;; XTDB, formerly known as Crux
                  com.xtdb/xtdb-core                  {:mvn/version "1.19.0"}
                  com.xtdb/xtdb-kafka                 {:mvn/version "1.19.0"}
                  com.xtdb/xtdb-rocksdb               {:mvn/version "1.19.0"}

                  ;; Transform
                  cljs-bean/cljs-bean                 {:mvn/version "1.7.0"}
                  com.rpl/specter                     {:mvn/version "1.1.3"}
                  juji/editscript                     {:mvn/version "0.5.7"}
                  town.lilac/pyramid                  {:mvn/version "3.1.4"}
                  ubergraph/ubergraph                 {:mvn/version "0.8.2"}

                  ;; API
                  com.cognitect.aws/api               {:mvn/version "0.8.524"}
                  com.cognitect.aws/endpoints         {:mvn/version "1.1.12.110"}
                  com.cognitect.aws/monitoring        {:mvn/version "811.2.958.0"}
                  com.cognitect.aws/s3                {:mvn/version "814.2.991.0"}

                  ;; Logs & spec & reporting
                  com.fulcrologic/guardrails          {:mvn/version "1.1.7"
                                                       :exclusions  [expound/expound]} ;; Use guardrails without its old expound-version, until its deps are updated
                  com.fzakaria/slf4j-timbre           {:mvn/version "0.3.21"}
                  com.taoensso/timbre                 {:mvn/version "5.1.2"}
                  com.wsscode/pathom-viz-connector    {:mvn/version "2021.10.16"}
                  conormcd/clj-honeycomb              {:mvn/version "1.0.6.536"
                                                       :exclusions  [io.honeycomb.libhoney/libhoney-java]}
                  expound/expound                     {:mvn/version "0.8.10"} ;; Version 0.8.9+ includes the datomic db crash-bug for failing specs
                  io.aviso/pretty                     {:mvn/version "1.1"}
                  io.honeycomb.beeline/beeline-core   {:mvn/version "1.6.1"}
                  io.honeycomb.libhoney/libhoney-java {:mvn/version "1.3.1"}
                  io.sentry/sentry-clj                {:mvn/version "5.3.159"}
                  metosin/malli                       {:mvn/version "0.6.2"}

                  ;; Comms
                  com.cognitect/transit-clj           {:mvn/version "1.0.324"}
                  com.cognitect/transit-cljs          {:mvn/version "0.8.269"}

                  ;; Web requests
                  clj-http/clj-http                   {:mvn/version "3.12.3"}

                  ;; Route
                  ;; ring-cors/ring-cors              {:mvn/version "0.1.13"}
                  com.wsscode/pathom3                 {:mvn/version "2021.11.16-alpha"}
                  metosin/muuntaja                    {:mvn/version "0.6.8"}
                  metosin/reitit-core                 {:mvn/version "0.5.15"}
                  metosin/reitit-ring                 {:mvn/version "0.5.15"}
                  metosin/ring-http-response          {:mvn/version "0.9.3"}
                  ovotech/ring-jwt                    {:mvn/version "2.3.0"}
                  ring/ring-anti-forgery              {:mvn/version "1.3.0"}
                  ring/ring-core                      {:mvn/version "1.9.4"}
                  ring/ring-defaults                  {:mvn/version "0.3.3"}

                  ;; Serve
                  aleph/aleph                         {:mvn/version "0.4.7-alpha10"}
                  http-kit/http-kit                   {:mvn/version "2.5.3"}

                  ;; HTML
                  hiccup/hiccup                       {:mvn/version "1.0.5"}

                  ;; Data/data transformation
                  camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"}
                  com.climate/claypoole               {:mvn/version "1.1.4"}
                  com.taoensso/nippy                  {:mvn/version "3.1.1"}
                  org.clojure/data.csv                {:mvn/version "1.0.0"}
                  uncomplicate/fluokitten             {:mvn/version "0.9.1"}

                  ;; Hero-icons
                  to.fluent/heroicons-clojure         {:mvn/version "1.0.4"}

                  ;; Spec
                  org.clojure/spec.alpha              {:mvn/version "0.2.194"}}

 :aliases        {;; Modes
                  ;; ##################################
                  :test   {:extra-paths ["test"]
                           :jvm-opts    []                  ;;"-Dguardrails.enabled"]
                           :extra-deps  {lambdaisland/kaocha        {:mvn/version "1.60.945"}
                                         org.clojure/test.check     {:mvn/version "1.1.0"}
                                         nubank/matcher-combinators {:mvn/version "3.3.1"}}}

                  :repl   {:main-opts   ["-m" "app.system" ":system/mode" ":system.mode/repl"]
                           :extra-paths ["test"]
                           :jvm-opts    [;;"-Dguardrails.enabled"
                                         "-Dsentry.disabled"
                                         "-Djdk.attach.allowAttachSelf"
                                         "-XX:-OmitStackTraceInFastThrow"]
                           :extra-deps  {day8.re-frame/re-frame-10x               {:mvn/version "1.1.13"}
                                         re-frisk/re-frisk                        {:mvn/version "1.5.2"}
                                         binaryage/dirac                          {:mvn/version "1.7.2"}
                                         com.clojure-goes-fast/clj-async-profiler {:mvn/version "0.5.1"}
                                         jpmonettas/flow-storm-debugger           {:mvn/version "0.6.0"}
                                         compliment/compliment                    {:mvn/version "0.3.12"}
                                         criterium/criterium                      {:mvn/version "0.4.6"}
                                         spieden/spyscope                         {:mvn/version "0.1.7"}
                                         com.taoensso/tufte                       {:mvn/version "2.2.0"}
                                         nubank/matcher-combinators               {:mvn/version "3.3.1"}}}

                  :run    {:main-opts ["-m" "app.system" ":system/mode" ":system.mode/run"]}}}
liquidz commented 2 years ago

@eneroth Thanks!

In my environment, it works without any errors.

$ clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}}' -M -m antq.core
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/private/tmp/foo/.m2/repository/com/fzakaria/slf4j-timbre/0.3.21/slf4j-timbre-0.3.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Ignoring binding found at [jar:file:/private/tmp/foo/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.

|    :file |                      :name | :current | :latest |
|----------+----------------------------+----------+---------|
| deps.edn | day8.re-frame/re-frame-10x |   1.1.13 |   1.2.0 |
|          |     org.clojure/core.async |  1.4.627 | 1.5.640 |
|          |     org.clojure/spec.alpha |  0.2.194 | 0.3.214 |
|          |       thheller/shadow-cljs |   2.16.5 |  2.16.6 |

Available diffs:
- https://github.com/day8/re-frame-10x/compare/1.1.13...1.2.0
- https://github.com/clojure/core.async/compare/v1.4.627...v1.5.640
- https://github.com/clojure/spec.alpha/compare/spec.alpha-0.2.194...v0.3.214

$ clojure -Tantq outdated
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

|    :file |                      :name | :current | :latest |
|----------+----------------------------+----------+---------|
| deps.edn | day8.re-frame/re-frame-10x |   1.1.13 |   1.2.0 |
|          |     org.clojure/core.async |  1.4.627 | 1.5.640 |
|          |     org.clojure/spec.alpha |  0.2.194 | 0.3.214 |
|          |       thheller/shadow-cljs |   2.16.5 |  2.16.6 |

Available diffs:
- https://github.com/day8/re-frame-10x/compare/1.1.13...1.2.0
- https://github.com/clojure/core.async/compare/v1.4.627...v1.5.640
- https://github.com/clojure/spec.alpha/compare/spec.alpha-0.2.194...v0.3.214

Do you have additional deps in the following files? (cf. https://clojure.org/reference/deps_and_cli#_deps_edn_sources)

This does not happen when it's installed as a tool.

From ver 1.3.0, antq is reffering above files. So if you installed ver 1.2.0 or earlier as a tool, it should behave differently.

eneroth commented 2 years ago

Aha, maybe that's it. I do have…

{:mvn/repos {"cognitect-dev-tools" {:url "https://dev-tools.cognitect.com/maven/releases/"}
             "datomic-cloud"       {:url "s3://datomic-releases-1fc2183a/maven/releases"}}
 :aliases   {:ion-dev {:deps      {com.datomic/ion-dev {:mvn/version "0.9.282"}}
                       :main-opts ["-m" "datomic.ion.dev"]}}}

… in ~/.clojure/deps.edn. AFAIK I'm not using the others.

Yep, if I just rename it to deps.edn.old, everything works as expected. So something in the above is throwing it for a loop.

liquidz commented 2 years ago

@eneroth Thanks for your confirmation!

From the error log, I think com.datomic/ion-dev and datomic-cloud repo is the cause of the problem, but my deps in private s3 repository (not com.datomic/ion-dev) was able to get the version information without any problem and I could not reproduce the problem...

I'll do some more digging.