question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoSuchMethodError: com.fasterxml.jackson.core.JsonStreamContext

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
cowtowncodercommented, Mar 1, 2019

@raj206 You seem to be running different (incompatible) versions of jackson-core and jackson-databind. Ideally minor versions should be the same, but minor version of jackson-core MUST be at least that of jackson-databind.

So: make sure jackson-core also has version 2.9.8 (as well as jackson-annotations). Otherwise method that jackson-databind 2.9 has been complied against is not present in implementation.

1reaction
cowtowncodercommented, Sep 12, 2019

@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, try mvn 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found