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

Incompatibility with Jackson 2.9.x #442

Closed
kinigitbyday opened this issue Nov 22, 2017 · 6 comments
Closed

Incompatibility with Jackson 2.9.x #442

kinigitbyday opened this issue Nov 22, 2017 · 6 comments

Comments

@kinigitbyday
Copy link

Case class deserialization logic is incompatible with Jackson 2.9.x

Expected behavior

Case class deserialization path should work with jackson-databind 2.9.x.

Actual behavior

NoSuchMethodError on the ValueInjector constructor. Appears to have been a break to the signature between 2.8x and 2.9.x (FasterXML/jackson-databind@76381c5#diff-dbcd29e987f27d95f964a674963a9066R24).

java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.deser.impl.ValueInjector.<init>(Lcom/fasterxml/jackson/databind/PropertyName;Lcom/fasterxml/jackson/databind/JavaType;Lcom/fasterxml/jackson/databind/util/Annotations;Lcom/fasterxml/jackson/databind/introspect/AnnotatedMember;Ljava/lang/Object;)V
	at com.twitter.finatra.json.internal.caseclass.utils.FieldInjection.beanProperty$lzycompute(FieldInjection.scala:55)
	at com.twitter.finatra.json.internal.caseclass.utils.FieldInjection.beanProperty(FieldInjection.scala:49)
	at com.twitter.finatra.json.internal.caseclass.utils.FieldInjection.inject(FieldInjection.scala:64)
	at com.twitter.finatra.json.internal.caseclass.jackson.CaseClassField.parse(CaseClassField.scala:136)
	at com.twitter.finatra.json.internal.caseclass.jackson.FinatraCaseClassDeserializer.$anonfun$parseConstructorValues$1(FinatraCaseClassDeserializer.scala:128)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at com.twitter.finatra.json.internal.caseclass.jackson.FinatraCaseClassDeserializer.parseConstructorValues(FinatraCaseClassDeserializer.scala:126)
	at com.twitter.finatra.json.internal.caseclass.jackson.FinatraCaseClassDeserializer.deserialize(FinatraCaseClassDeserializer.scala:93)
	at com.twitter.finatra.json.internal.caseclass.jackson.FinatraCaseClassDeserializer.deserializeNonWrapperClass(FinatraCaseClassDeserializer.scala:85)
	at com.twitter.finatra.json.internal.caseclass.jackson.FinatraCaseClassDeserializer.deserialize(FinatraCaseClassDeserializer.scala:67)
	at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1608)
	at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1292)
	at com.twitter.finatra.http.internal.marshalling.FinatraDefaultMessageBodyReader.parse(FinatraDefaultMessageBodyReader.scala:34)
	at com.twitter.finatra.http.internal.marshalling.MessageBodyManager.read(MessageBodyManager.scala:79)

Steps to reproduce the behavior

  1. Create a controller with a method that uses a case class request.
  2. Pull in jackson 2.9.x
  3. Make a request to the aforementioned method.
@devshorts
Copy link

Related FasterXML/jackson-databind#1835

@cacoco
Copy link
Contributor

cacoco commented Nov 24, 2017

@kinigitbyday Finatra is only expected to be compatible with the version of Jackson specified in the build.sbt which is Jackson 2.8.4 at this time (this is true of all dependencies).

@cowtowncoder
Copy link

Jackson 2.9.3 will add constructor back as deprecated so that hopefully that patch and later will work without problem. Constructor should have been marked as deprecated for at least one minor version; unfortunately this did not happen with 2.9.0.

@cacoco
Copy link
Contributor

cacoco commented Dec 8, 2017

@cowtowncoder great, thanks for letting us know. Finatra is developed as part of a large monorepo inside of Twitter and thus updating Jackson versions is typically a large undertaking. I don't think we have plans as of yet to update but when we do, I'll try to push that we move to at least Jackson 2.9.3. Thanks again.

@cowtowncoder
Copy link

@cacoco Understood, no rush. I am hoping to release 2.9.3 very soon now (possibly today) as there is a larger batch of fixes pending.

@mosesn
Copy link
Contributor

mosesn commented Aug 29, 2018

@kinigitbyday @cowtowncoder we upgraded to 2.9.6, I think we should be OK now.

@mosesn mosesn closed this as completed Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants