Announcement Announcement Module
Collapse
No announcement yet.
Problem deserializing Post Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem deserializing Post

    Hai..,

    When i am getting in to the facebook feed iam getting a error in "deserializePost" method of objectMapper.readValue(node, type) place
    objectMapper.readValue(node, type)

    on this error "Caused by: org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.Post]: can not instantiate from JSON object (need to add/enable type information?)"


    so , please help me

    thanking you
    k.praveen

  • #2
    It would be helpful if you would tell me which version of Spring Social Facebook you are using and maybe which method you were calling on the API binding. A stack trace might also be useful in debugging this.

    Based on what little you show, it appears that you're using a version of Spring Social Facebook *prior to* 1.1.0.M3 or 1.0.3. I say that because it was in those versions that I converted to Jackson 2 and the error references a Jackson 1 JsonMappingException. Either that or you are using the new stuff and still have Jackson 1 in your classpath. If that's the case, fix your build to include Jackson 2 and the problem might go away.

    FWIW, the Maven dependency for Jackson 2 is:

    Code:
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.2.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.2.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>2.2.2</version>
    </dependency>
    Or, for Gradle:

    Code:
    compile ("com.fasterxml.jackson.core:jackson-core:2.2.2")
    compile ("com.fasterxml.jackson.core:jackson-databind:2.2.2")
    compile ("com.fasterxml.jackson.core:jackson-annotations:2.2.2")
    Last edited by habuma; Jul 10th, 2013, 09:04 AM.

    Comment

    Working...
    X