spotify / async-google-pubsub-client

[SUNSET] Async Google Pubsub Client
Apache License 2.0
158 stars 40 forks source link

Puller JSON deserialization appears broken #22

Closed zvozin closed 7 years ago

zvozin commented 8 years ago
ERROR com.spotify.google.cloud.pubsub.client.Puller - Pull failed
com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.spotify.google.cloud.pubsub.client.PullResponse: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
 at [Source: java.util.zip.GZIPInputStream@46a89674; line: 1, column: 1]
    at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
    at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1456)
    at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1012)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserialize(AbstractDeserializer.java:149)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3798)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2908)
    at com.spotify.google.cloud.pubsub.client.Json.read(Json.java:51)
    at com.spotify.google.cloud.pubsub.client.Pubsub.lambda$requestJavaNet$8(Pubsub.java:908)
    at com.spotify.google.cloud.pubsub.client.Pubsub$$Lambda$37/1565740893.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
zvozin commented 8 years ago

Messages:

{
  "receivedMessages": [
    {
      "ackId": "RUFeQBJMOABESVMrQwsqWBFOBCEhPjA-RVNEUAYWLF1GSFE3GQhoUQ5PXiM_NSAoRRUCCBQFfH1xXVF1WFkaB1ENGXJ8ZH1sDkdUA0dSeVVcEQ16bVxXOVcJHXR8Z3FjWBoBC0RRVrrM2chaZho9XxJLLD5-MzU",
      "message": {
        "data": "emhvcGE=",
        "attributes": {
          "code": "processed_..._urls",
          "path": "addThi...gz"
        },
        "messageId": "64461649290912",
        "publishTime": "2016-11-16T16:00:46.972Z"
      }
    }
  ]
}
zvozin commented 8 years ago

Pertinent parts of build.gradle:

    compile group: 'com.spotify', name: 'async-google-pubsub-client', version: '1.26'

    compile group: 'io.javaslang', name: 'javaslang', version: '2.0.4'
    compile group: 'joda-time', name: 'joda-time', version: '2.9.5'

    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.4'
    compile("io.javaslang:javaslang-jackson:2.0.4")
    compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: '2.8.4'
zvozin commented 8 years ago

Related to the other issue I opened, seemignly :).

antonbelev commented 7 years ago

@zvozin do you have any updates on this issue? I'm experiencing the same problem...

zvozin commented 7 years ago

Jackson version mismatch. Exclude the one Spotify brings, and use your own.

danielnorberg commented 7 years ago

Closing as this should be resolved, please reopen if necessary.