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

Incompatible with cheshire? #58

Closed
falberto opened this issue Jan 17, 2021 · 1 comment
Closed

Incompatible with cheshire? #58

falberto opened this issue Jan 17, 2021 · 1 comment
Assignees
Labels
question A request for information of clarification

Comments

@falberto
Copy link

falberto commented Jan 17, 2021

When launch a project with the follow dependences a exception is rised.

a test repo:

https://github.com/falberto/ulog-test.git

 :dependencies [[org.clojure/clojure "1.10.1"]
                 [clj-http "3.11.0"]
                 [cheshire "5.10.0"]
                 [com.brunobonacci/mulog "0.6.4"]
                 [com.brunobonacci/mulog-zipkin "0.6.4"]]

#error {
 :cause com.fasterxml.jackson.core.util.JacksonFeature
 :via
 [{:type clojure.lang.Compiler$CompilerException
   :message Syntax error compiling at (test_ulog/core.clj:7:1).
   :data #:clojure.error{:phase :compile-syntax-check, :line 7, :column 1, :source test_ulog/core.clj}
   :at [clojure.lang.Compiler load Compiler.java 7648]}
  {:type clojure.lang.ExceptionInfo
   :message Unable to load appropriate publisher. Please ensure you have the following dependency [com.brunobonacci/mulog-zipkin "x.y.z"] in your project.clj
   :data {:config {:type :zipkin, :url http://localhost:9411/}}
   :at [com.brunobonacci.mulog.publisher$loading_error invokeStatic publisher.clj 156]}
  {:type clojure.lang.Compiler$CompilerException
   :message Syntax error macroexpanding at (core.clj:142:3).
   :data #:clojure.error{:phase :execution, :line 142, :column 3, :source core.clj}
   :at [clojure.lang.Compiler$InvokeExpr eval Compiler.java 3707]}
  {:type java.lang.NoClassDefFoundError
   :message com/fasterxml/jackson/core/util/JacksonFeature
   :at [com.fasterxml.jackson.databind.ObjectMapper <init> ObjectMapper.java 655]}
  {:type java.lang.ClassNotFoundException
   :message com.fasterxml.jackson.core.util.JacksonFeature
   :at [jdk.internal.loader.BuiltinClassLoader loadClass BuiltinClassLoader.java 581]}]
 :trace
 [[jdk.internal.loader.BuiltinClassLoader loadClass BuiltinClassLoader.java 581]
  [jdk.internal.loader.ClassLoaders$AppClassLoader loadClass ClassLoaders.java 178]
  [java.lang.ClassLoader loadClass ClassLoader.java 522]
  [com.fasterxml.jackson.databind.ObjectMapper <init> ObjectMapper.java 655]
  [com.fasterxml.jackson.databind.ObjectMapper <init> ObjectMapper.java 558]
  [jsonista.core$object_mapper invokeStatic core.clj 101]
  [jsonista.core$object_mapper invoke core.clj 101]
  [clojure.lang.AFn applyToHelper AFn.java 154]
  [clojure.lang.AFn applyTo AFn.java 144]
  [clojure.lang.Compiler$InvokeExpr eval Compiler.java 3702]
  [clojure.lang.Compiler$DefExpr eval Compiler.java 457]
  [clojure.lang.Compiler eval Compiler.java 7182]
  [clojure.lang.Compiler load Compiler.java 7636]
  [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__6839 invoke core.clj 6126]
  [clojure.core$load invokeStatic core.clj 6125]
  [clojure.core$load doInvoke core.clj 6109]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5908]
  [clojure.core$load_one invoke core.clj 5903]
  [clojure.core$load_lib$fn__6780 invoke core.clj 5948]
  [clojure.core$load_lib invokeStatic core.clj 5947]
  [clojure.core$load_lib doInvoke core.clj 5928]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$load_libs invokeStatic core.clj 5985]
  [clojure.core$load_libs doInvoke core.clj 5969]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$require invokeStatic core.clj 6007]
  [clojure.core$require doInvoke core.clj 6007]
  [clojure.lang.RestFn invoke RestFn.java 421]
  [com.brunobonacci.mulog.common.json$eval796$loading__6721__auto____797 invoke json.clj 1]
  [com.brunobonacci.mulog.common.json$eval796 invokeStatic json.clj 1]
  [com.brunobonacci.mulog.common.json$eval796 invoke json.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7177]
  [clojure.lang.Compiler eval Compiler.java 7166]
  [clojure.lang.Compiler load Compiler.java 7636]
  [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__6839 invoke core.clj 6126]
  [clojure.core$load invokeStatic core.clj 6125]
  [clojure.core$load doInvoke core.clj 6109]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5908]
  [clojure.core$load_one invoke core.clj 5903]
  [clojure.core$load_lib$fn__6780 invoke core.clj 5948]
  [clojure.core$load_lib invokeStatic core.clj 5947]
  [clojure.core$load_lib doInvoke core.clj 5928]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$load_libs invokeStatic core.clj 5985]
  [clojure.core$load_libs doInvoke core.clj 5969]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$require invokeStatic core.clj 6007]
  [clojure.core$require doInvoke core.clj 6007]
  [clojure.lang.RestFn invoke RestFn.java 619]
  [com.brunobonacci.mulog.publishers.zipkin$eval790$loading__6721__auto____791 invoke zipkin.clj 1]
  [com.brunobonacci.mulog.publishers.zipkin$eval790 invokeStatic zipkin.clj 1]
  [com.brunobonacci.mulog.publishers.zipkin$eval790 invoke zipkin.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7177]
  [clojure.lang.Compiler eval Compiler.java 7166]
  [clojure.lang.Compiler load Compiler.java 7636]
  [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__6839 invoke core.clj 6126]
  [clojure.core$load invokeStatic core.clj 6125]
  [clojure.core$load doInvoke core.clj 6109]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5908]
  [clojure.core$load_one invoke core.clj 5903]
  [clojure.core$load_lib$fn__6780 invoke core.clj 5948]
  [clojure.core$load_lib invokeStatic core.clj 5947]
  [clojure.core$load_lib doInvoke core.clj 5928]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$load_libs invokeStatic core.clj 5985]
  [clojure.core$load_libs doInvoke core.clj 5969]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$require invokeStatic core.clj 6007]
  [clojure.core$require doInvoke core.clj 6007]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [com.brunobonacci.mulog.publisher$load_function_from_name invokeStatic publisher.clj 143]
  [com.brunobonacci.mulog.publisher$load_function_from_name invoke publisher.clj 126]
  [com.brunobonacci.mulog.publisher$load_function_from_name invokeStatic publisher.clj 136]
  [com.brunobonacci.mulog.publisher$load_function_from_name invoke publisher.clj 126]
  [com.brunobonacci.mulog.publisher$load_dynamic_publisher$fn__570 invoke publisher.clj 182]
  [com.brunobonacci.mulog.publisher$load_dynamic_publisher invokeStatic publisher.clj 181]
  [com.brunobonacci.mulog.publisher$load_dynamic_publisher invoke publisher.clj 178]
  [com.brunobonacci.mulog.publisher$eval625$fn__626 invoke publisher.clj 285]
  [clojure.lang.MultiFn invoke MultiFn.java 229]
  [com.brunobonacci.mulog.core$start_publisher_BANG_ invokeStatic core.clj 176]
  [com.brunobonacci.mulog.core$start_publisher_BANG_ invoke core.clj 174]
  [clojure.core$partial$fn__5839 invoke core.clj 2624]
  [clojure.core$map$fn__5866 invoke core.clj 2753]
  [clojure.lang.LazySeq sval LazySeq.java 42]
  [clojure.lang.LazySeq seq LazySeq.java 51]
  [clojure.lang.RT seq RT.java 535]
  [clojure.core$seq__5402 invokeStatic core.clj 137]
  [clojure.core$dorun invokeStatic core.clj 3133]
  [clojure.core$doall invokeStatic core.clj 3148]
  [clojure.core$doall invoke core.clj 3148]
  [com.brunobonacci.mulog$start_publisher_BANG_ invokeStatic mulog.clj 145]
  [com.brunobonacci.mulog$start_publisher_BANG_ invoke mulog.clj 87]
  [com.brunobonacci.mulog$start_publisher_BANG_ invokeStatic mulog.clj 139]
  [com.brunobonacci.mulog$start_publisher_BANG_ invoke mulog.clj 87]
  [test_ulog.core$eval786 invokeStatic core.clj 7]
  [test_ulog.core$eval786 invoke core.clj 7]
  [clojure.lang.Compiler eval Compiler.java 7177]
  [clojure.lang.Compiler load Compiler.java 7636]
  [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__6839 invoke core.clj 6126]
  [clojure.core$load invokeStatic core.clj 6125]
  [clojure.core$load doInvoke core.clj 6109]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5908]
  [clojure.core$load_one invoke core.clj 5903]
  [clojure.core$load_lib$fn__6780 invoke core.clj 5948]
  [clojure.core$load_lib invokeStatic core.clj 5947]
  [clojure.core$load_lib doInvoke core.clj 5928]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$load_libs invokeStatic core.clj 5985]
  [clojure.core$load_libs doInvoke core.clj 5969]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.core$require invokeStatic core.clj 6007]
  [clojure.core$require doInvoke core.clj 6007]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [user$eval5 invokeStatic form-init8022119484354986898.clj 1]
  [user$eval5 invoke form-init8022119484354986898.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7177]
  [clojure.lang.Compiler eval Compiler.java 7166]
  [clojure.lang.Compiler eval Compiler.java 7166]
  [clojure.lang.Compiler load Compiler.java 7636]
  [clojure.lang.Compiler loadFile Compiler.java 7574]
  [clojure.main$load_script invokeStatic main.clj 475]
  [clojure.main$init_opt invokeStatic main.clj 477]
  [clojure.main$init_opt invoke main.clj 477]
  [clojure.main$initialize invokeStatic main.clj 508]
  [clojure.main$null_opt invokeStatic main.clj 542]
  [clojure.main$null_opt invoke main.clj 539]
  [clojure.main$main invokeStatic main.clj 664]
  [clojure.main$main doInvoke main.clj 616]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.lang.Var applyTo Var.java 705]
  [clojure.main main main.java 40]]}`

@BrunoBonacci BrunoBonacci self-assigned this Jan 17, 2021
@BrunoBonacci BrunoBonacci added the question A request for information of clarification label Jan 17, 2021
@BrunoBonacci
Copy link
Owner

Hi @falberto

cheshire uses Jackson 2.10 while mulog-zipkin uses jasonista which in turns depends on Jackson 2.12

The easy solution is you add Jackson depdencies in your projects to pin all of them at the same version, until cheshire updates:

  :dependencies [[org.clojure/clojure "1.10.1"]
                 [clj-http "3.11.0"]
                 [cheshire "5.10.0"]
                 [com.fasterxml.jackson.core/jackson-core "2.12.0"]
                 [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.12.0"]
                 [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.12.0"]
                 [com.brunobonacci/mulog "0.6.4"]
                 [com.brunobonacci/mulog-zipkin "0.6.4"]
                 ]

With this should work! Let me know if you have further problems

Bruno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A request for information of clarification
Projects
None yet
Development

No branches or pull requests

2 participants