Announcement Announcement Module
Collapse
No announcement yet.
GetImage from UserOperations for ORIGINAL Size throws error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GetImage from UserOperations for ORIGINAL Size throws error

    Hello !

    When using the Spring Social Twitter Intration API, am getting the following error on a call to

    final byte[] fileBytes = userOps.getUserProfileImage("prarun", ImageSize.ORIGINAL);
    org.springframework.web.client.ResourceAccessExcep tion: I/O error: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
    at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpIn putStream@3b8f3f; line: 1, column: 2]; nested exception is org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
    at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpIn putStream@3b8f3f; line: 1, column: 2]
    Has anyone used this API and does it work ? Am using Spring Social 1.0.0.M3

    Thanks,
    Ic

  • #2
    Please upgrade to Spring Social 1.0.0.RC3.

    Keith

    Comment


    • #3
      Still issue, after upgrading to RC3

      Hi Keith,

      I upgraded to RC3 but still face the same exception.

      Thanks,
      Ic

      Comment


      • #4
        There is a bug where there is no message converter registered with the RestTemplate used by TwitterTemplate to be able to handle the image data coming back and convert it into bytes. I've fixed that and pushed a new snapshot build with the fix. But even with that bug, I was not seeing the type of error you're seeing.

        I tried fetching ORIGINAL images for "prarun", "habuma", "kdonald", and a handful of other users and it worked every time (once the aforementioned bug was fixed).

        Could you try again with the latest snapshot build and let me know if it works or not. And, if if it doesn't work, could you provide a more complete stacktrace? I'd also be interested in knowing what's in your classpath; specifically, whether or not you have HttpClient in your classpath.

        Comment

        Working...
        X