NoSuchMethodError: com.fasterxml.jackson.core.JsonStreamContext
See original GitHub issueI’m trying to bump the jackson version number from 2.8.6 to 2.9.8 and it is just not working the way it is supposed to work.
It’s giving this error:
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonStreamContext.<init>(II)V
at com.fasterxml.jackson.databind.util.TokenBufferReadContext.<init>(TokenBufferReadContext.java:59)
at com.fasterxml.jackson.databind.util.TokenBufferReadContext.createRootContext(TokenBufferReadContext.java:89)
at com.fasterxml.jackson.databind.util.TokenBuffer$Parser.<init>(TokenBuffer.java:1298)
at com.fasterxml.jackson.databind.util.TokenBuffer.asParser(TokenBuffer.java:276)
at com.fasterxml.jackson.databind.util.TokenBuffer.asParser(TokenBuffer.java:242)
at com.fasterxml.jackson.databind.ObjectMapper.valueToTree(ObjectMapper.java:2798)
at com.example.FooTest.testFilter(FooTest.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Don’t know why com.fasterxml.jackson.databind.ObjectMapper.valueToTree(ObjectMapper.java:2798)
is throwing the error. Did the implementation change?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
com.fasterxml.jackson.core.JsonStreamContext - java
8 and it is just not working the way it is supposed to work. It's giving this error: java.lang.NoSuchMethodError: com.fasterxml.jackson.core.
Read more >JsonStreamContext (Jackson-core 2.9.0 API) - FasterXML
Method that returns true if this context is an Array context; that is, content is being read from or written to a Json...
Read more >Users are unable to publish changes through the Provisioning ...
NoSuchMethodError : com.fasterxml.jackson.core.JsonStreamContext.<init>(Lcom/fasterxml/jackson/core/JsonStreamContext;)V.
Read more >ERROR: When trying open an SSH Session to vagrant
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonStreamContext.<init>(Lcom/fasterxml/jackson/core/JsonStreamContext;)V
Read more >com.fasterxml.jackson.core.JsonStreamContext.<init>(II)V)
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonStreamContext.<init>(II)V. 위 오류는 jackson-core 버전과 jackson-bind 버전이 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@raj206 You seem to be running different (incompatible) versions of
jackson-core
andjackson-databind
. Ideally minor versions should be the same, but minor version ofjackson-core
MUST be at least that ofjackson-databind
.So: make sure
jackson-core
also has version2.9.8
(as well asjackson-annotations
). Otherwise method thatjackson-databind
2.9 has been complied against is not present in implementation.@mihingo No that is definitely an error with incompatible versions of components. Sometimes that is due to simply wrong set of jars, sometimes more than one instance of specific component (with different versions).
But looking at
pom.xml
is not enough; with Maven, trymvn dependency:tree
to see actually versions being used. Or when building a deployment packge, what jars are actually included in uber-jar, war or tar.