Skip to content

Instantly share code, notes, and snippets.

@jmglov
Created November 6, 2023 06:34
Show Gist options
  • Save jmglov/bcb9f7bf8b5cdbdbab143bdff31c401a to your computer and use it in GitHub Desktop.
Save jmglov/bcb9f7bf8b5cdbdbab143bdff31c401a to your computer and use it in GitHub Desktop.
The exception that I get when trying to eval clojure.tools.logging.test in babashka
clojure.lang.ExceptionInfo: Could not resolve symbol: impl/LoggerFactory
{:type :sci/error, :line 202, :column 3, :message "Could not resolve symbol: impl/LoggerFactory", :sci.impl/callstack #object[clojure.lang.Volatile 0x495819d3 {:status :ready, :val ({:line 198, :column 1, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj"} {:line 198, :column 1, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj", :sci.impl/f-meta {:ns #object[sci.lang.Namespace 0x60734cc4 "clojure.core"], :macro true, :sci/built-in true, :name defn, :doc "Same as (def name (fn [params* ] exprs*)) or (def\n name (fn ([params* ] exprs*)+)) with any doc-string or attrs added\n to the var metadata. prepost-map defines a map with optional keys\n :pre and :post that contain collections of pre or post conditions.", :arglists ([name doc-string? attr-map? [params*] prepost-map? body] [name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?])}} {:line 198, :column 1, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj"} {:sci.impl/fn {:macro nil, :fn-name logger-factory}, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj"} {:sci.impl/fn {:macro nil, :fn-name logger-factory}, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj", :sci.impl/f-meta {:ns #object[sci.lang.Namespace 0x60734cc4 "clojure.core"], :macro true, :sci/built-in true, :name fn, :doc "params => positional-params*, or positional-params* & rest-param\n positional-param => binding-form\n rest-param => binding-form\n binding-form => name, or destructuring-form\n\n Defines a function.\n\n See https://clojure.org/reference/special_forms#fn for more information", :arglists ([& sigs])}} {:sci.impl/fn {:macro nil, :fn-name logger-factory}, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj"} {:line 202, :column 3, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj"} {:line 202, :column 3, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj", :sci.impl/f-meta {:ns #object[sci.lang.Namespace 0x60734cc4 "clojure.core"], :macro true, :sci/built-in true, :name reify, :doc "reify creates an object implementing a protocol or interface.\n reify is a macro with the following structure:\n\n (reify options* specs*)\n \n Currently there are no options.\n\n Each spec consists of the protocol or interface name followed by zero\n or more method bodies:\n\n protocol-or-interface-or-Object\n (methodName [args+] body)*\n\n Methods should be supplied for all methods of the desired\n protocol(s) and interface(s). You can also define overrides for\n methods of Object. Note that the first parameter must be supplied to\n correspond to the target object ('this' in Java parlance). Thus\n methods for interfaces will take one more argument than do the\n interface declarations. Note also that recur calls to the method\n head should *not* pass the target object, it will be supplied\n automatically and can not be substituted.\n\n The return type can be indicated by a type hint on the method name,\n and arg types can be indicated by a type hint on arg names. If you\n leave out all hints, reify will try to match on same name/arity\n method in the protocol(s)/interface(s) - this is preferred. If you\n supply any hints at all, no inference is done, so all hints (or\n default of Object) must be correct, for both arguments and return\n type. If a method is overloaded in a protocol/interface, multiple\n independent method definitions must be supplied. If overloaded with\n same arity in an interface you must specify complete hints to\n disambiguate - a missing hint implies Object.\n\n recur works to method heads The method bodies of reify are lexical\n closures, and can refer to the surrounding local scope:\n \n (str (let [f \"foo\"] \n (reify Object \n (toString [this] f))))\n == \"foo\"\n\n (seq (let [f \"foo\"] \n (reify clojure.lang.Seqable \n (seq [this] (seq f)))))\n == (\\f \\o \\o))\n \n reify always implements clojure.lang.IObj and transfers meta\n data of the form to the created object.\n \n (meta ^{:k :v} (reify Object (toString [this] \"foo\")))\n == {:k :v}", :arglists ([& opts+specs])}} {:line 202, :column 3, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj"} {:line 202, :column 3, :ns #object[sci.lang.Namespace 0x22328391 "clojure.tools.logging.test"], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj", :sci.impl/f-meta {:ns #object[sci.lang.Namespace 0x60734cc4 "clojure.core"], :sci/built-in true, :name reify*}})}], :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj", :phase "analysis"}
at sci.impl.utils$rethrow_with_location_of_node.invokeStatic (utils.cljc:129)
sci.impl.utils$rethrow_with_location_of_node.invoke (utils.cljc:93)
sci.impl.utils$rethrow_with_location_of_node.invokeStatic (utils.cljc:94)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1607)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1570)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1777)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_children_tail.invokeStatic (analyzer.cljc:105)
sci.impl.analyzer$return_do.invokeStatic (analyzer.cljc:113)
sci.impl.analyzer$expand_fn_args_PLUS_body.invokeStatic (analyzer.cljc:328)
sci.impl.analyzer$analyze_fn_STAR_$fn__4158.invoke (analyzer.cljc:412)
clojure.lang.PersistentList.reduce (PersistentList.java:141)
clojure.core$reduce.invokeStatic (core.clj:6885)
sci.impl.analyzer$analyze_fn_STAR_.invokeStatic (analyzer.cljc:410)
sci.impl.analyzer$dispatch_special.invokeStatic (analyzer.cljc:1436)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1533)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1570)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1777)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_def.invokeStatic (analyzer.cljc:743)
sci.impl.analyzer$dispatch_special.invokeStatic (analyzer.cljc:1436)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1533)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1570)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:20)
sci.core$eval_form.invokeStatic (core.cljc:329)
babashka.nrepl.impl.server$eval_msg$fn__27295$fn__27296.invoke (server.clj:108)
babashka.nrepl.impl.server$eval_msg$fn__27295.invoke (server.clj:104)
babashka.nrepl.impl.server$eval_msg.invokeStatic (server.clj:94)
babashka.nrepl.impl.server$fn__27402.invokeStatic (server.clj:371)
babashka.nrepl.impl.server/fn (server.clj:366)
clojure.lang.MultiFn.invoke (MultiFn.java:239)
babashka.nrepl.server.middleware$default_process_msg.invokeStatic (middleware.clj:13)
babashka.nrepl.server.middleware$wrap_process_message$fn__27449.invoke (middleware.clj:31)
clojure.core$completing$fn__8528.invoke (core.clj:6931)
clojure.core$map$fn__5931$fn__5932.invoke (core.clj:2759)
babashka.nrepl.impl.server$session_loop.invokeStatic (server.clj:416)
babashka.nrepl.impl.server$listen$fn__27435.invoke (server.clj:436)
sci.impl.vars$binding_conveyor_fn$fn__440.invoke (vars.cljc:133)
clojure.core$binding_conveyor_fn$fn__5823.invoke (core.clj:2047)
clojure.lang.AFn.call (AFn.java:18)
java.util.concurrent.FutureTask.run (FutureTask.java:317)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
java.lang.Thread.run (Thread.java:1589)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine (PlatformThreads.java:775)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine (PosixPlatformThreads.java:203)
Caused by: clojure.lang.ExceptionInfo: Could not resolve symbol: impl/LoggerFactory
{:type :sci/error, :line 198, :column 1, :file "/home/jmglov/Documents/code/clojure/awno-api/src/clojure/tools/logging/test.clj", :phase "analysis"}
at sci.impl.utils$throw_error_with_location.invokeStatic (utils.cljc:43)
sci.impl.resolve$throw_error_with_location.invokeStatic (resolve.cljc:11)
sci.impl.resolve$resolve_symbol.invokeStatic (resolve.cljc:264)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1782)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1777)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_children$fn__4079.invoke (analyzer.cljc:301)
clojure.core$mapv$fn__8535.invoke (core.clj:6979)
clojure.lang.PersistentVector.reduce (PersistentVector.java:343)
clojure.core$reduce.invokeStatic (core.clj:6885)
clojure.core$mapv.invokeStatic (core.clj:6970)
sci.impl.analyzer$analyze_children.invokeStatic (analyzer.cljc:300)
sci.impl.analyzer$analyze_vec_or_set.invokeStatic (analyzer.cljc:1727)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1780)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1777)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_children$fn__4079.invoke (analyzer.cljc:301)
clojure.core$mapv$fn__8535.invoke (core.clj:6979)
clojure.core.protocols$fn__8249.invokeStatic (protocols.clj:168)
clojure.core.protocols/fn (protocols.clj:124)
clojure.core.protocols$fn__8204$G__8199__8213.invoke (protocols.clj:19)
clojure.core.protocols$seq_reduce.invokeStatic (protocols.clj:31)
clojure.core.protocols$fn__8236.invokeStatic (protocols.clj:75)
clojure.core.protocols/fn (protocols.clj:75)
clojure.core.protocols$fn__8178$G__8173__8191.invoke (protocols.clj:13)
clojure.core$reduce.invokeStatic (core.clj:6886)
clojure.core$mapv.invokeStatic (core.clj:6970)
sci.impl.analyzer$analyze_children.invokeStatic (analyzer.cljc:300)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1602)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1570)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1777)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_children_tail.invokeStatic (analyzer.cljc:105)
sci.impl.analyzer$return_do.invokeStatic (analyzer.cljc:113)
sci.impl.analyzer$expand_fn_args_PLUS_body.invokeStatic (analyzer.cljc:328)
sci.impl.analyzer$analyze_fn_STAR_$fn__4158.invoke (analyzer.cljc:412)
clojure.lang.PersistentList.reduce (PersistentList.java:141)
clojure.core$reduce.invokeStatic (core.clj:6885)
sci.impl.analyzer$analyze_fn_STAR_.invokeStatic (analyzer.cljc:410)
sci.impl.analyzer$dispatch_special.invokeStatic (analyzer.cljc:1436)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1533)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1570)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1777)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_def.invokeStatic (analyzer.cljc:743)
sci.impl.analyzer$dispatch_special.invokeStatic (analyzer.cljc:1436)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1533)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.analyzer$analyze.invoke (analyzer.cljc:1775)
sci.impl.analyzer$analyze_call.invokeStatic (analyzer.cljc:1570)
sci.impl.analyzer$analyze.invokeStatic (analyzer.cljc:1812)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:20)
sci.core$eval_form.invokeStatic (core.cljc:329)
babashka.nrepl.impl.server$eval_msg$fn__27295$fn__27296.invoke (server.clj:108)
babashka.nrepl.impl.server$eval_msg$fn__27295.invoke (server.clj:104)
babashka.nrepl.impl.server$eval_msg.invokeStatic (server.clj:94)
babashka.nrepl.impl.server$fn__27402.invokeStatic (server.clj:371)
babashka.nrepl.impl.server/fn (server.clj:366)
clojure.lang.MultiFn.invoke (MultiFn.java:239)
babashka.nrepl.server.middleware$default_process_msg.invokeStatic (middleware.clj:13)
babashka.nrepl.server.middleware$wrap_process_message$fn__27449.invoke (middleware.clj:31)
clojure.core$completing$fn__8528.invoke (core.clj:6931)
clojure.core$map$fn__5931$fn__5932.invoke (core.clj:2759)
babashka.nrepl.impl.server$session_loop.invokeStatic (server.clj:416)
babashka.nrepl.impl.server$listen$fn__27435.invoke (server.clj:436)
sci.impl.vars$binding_conveyor_fn$fn__440.invoke (vars.cljc:133)
clojure.core$binding_conveyor_fn$fn__5823.invoke (core.clj:2047)
clojure.lang.AFn.call (AFn.java:18)
java.util.concurrent.FutureTask.run (FutureTask.java:317)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
java.lang.Thread.run (Thread.java:1589)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine (PlatformThreads.java:775)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine (PosixPlatformThreads.java:203)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment