java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/exc/InputCoercionException,
compiling:(jsonista/core.clj:79:38)
If you're getting this kind of error message when requiring jsonista.core
or otherwise using jsonista (e.g. via muuntaja),
the problem is that you're depending on different versions of jackson-core
and jackson-databind
. You need to depend on the same versions of both for jsonista to work correctly.
Run lein deps :tree
(Leiningen users) or clj -Stree
(deps.edn users) in your project and look for lines with com.fasterxml.jackson.core/jackson-core
and com.fasterxml.jackson.core/jackson-core
. If their versions do not match, that's the problem.
Possible solutions:
jackson-core
and jackson-databind
as dependencies for your project. For example, if you use Leiningen, add these lines to the :dependencies
vector in your project.clj
:[com.fasterxml.jackson.core/jackson-core "2.10.2"]
[com.fasterxml.jackson.core/jackson-databind "2.10.2"]
jackson-core
and use :exclusions
to prevent it from happening.Already encoded JSON values can be used with RawValue marker class:
(import '[com.fasterxml.jackson.databind.util RawValue])
(json/write-value-as-string
{:version 555
:foobar (RawValue. "{\"foo\": \"bar\"}")})
Can you improve this documentation? These fine people already did:
Juho Teperi & Miikka KoskinenEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close