Results 1 to 8 of 8

Thread: Spring (core, web, mvc, etc) 3.0.2.RELEASE compatibility with Spring Social 1.0.0.M2

  1. #1
    Join Date
    Mar 2011
    Posts
    2

    Default Spring (core, web, mvc, etc) 3.0.2.RELEASE compatibility with Spring Social 1.0.0.M2

    I am trying the spring social libraries and I have ran into a problem with using them with Spring (core, web, mvc, security) 3.0.2.RELEASE. Below if the exception I get when trying to POST a tweet.

    I am using version 3.0.2.RELEASE of spring-web.jar and I did verify that class ClientHttpRequest does not have a getURI method.

    Is there something I am doing wrong or is there an issue with the library?

    Thanks,
    Scott.

    java.lang.NoSuchMethodError: org.springframework.http.client.ClientHttpRequest. getURI()Ljava/net/URI;
    at org.springframework.social.oauth1.Spring30OAuth1Re questFactory$OAuth1SigningRequest.getURI(Spring30O Auth1RequestFactory.java:91)
    at org.springframework.social.oauth1.SigningUtils.spr ing30buildAuthorizationHeaderValue(SigningUtils.ja va:77)
    at org.springframework.social.oauth1.Spring30OAuth1Re questFactory$OAuth1SigningRequest.execute(Spring30 OAuth1RequestFactory.java:84)
    at org.springframework.web.client.RestTemplate.doExec ute(RestTemplate.java:438)
    at org.springframework.web.client.RestTemplate.execut e(RestTemplate.java:401)
    at org.springframework.web.client.RestTemplate.postFo rEntity(RestTemplate.java:302)
    at org.springframework.social.twitter.TwitterTemplate .updateStatus(TwitterTemplate.java:138)
    at org.springframework.social.twitter.TwitterTemplate .updateStatus(TwitterTemplate.java:131)
    at
    ...
    Last edited by sdever; Mar 31st, 2011 at 09:57 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    You're right. The getURI() method wasn't in Spring 3.0.2. It was added in Spring 3.0.3. So, it looks like you're one version behind what you'd need to be at.
    Craig Walls
    Spring Social Project Lead

  3. #3
    Join Date
    Mar 2011
    Posts
    2

    Default

    I have upgraded to Spring 3.0.5 and I have gotten further. However I am still getting an error, but my tweet did make it to twitter. Progress!

    Thanks again for your help!
    Scott.

    Here is the exception:

    org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.web.client.RestClientException : Could not extract response: no suitable HttpMessageConverter found for response type [java.util.Map] and content type [application/json;charset=utf-8]
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:656)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)

  4. #4
    Join Date
    Jun 2011
    Posts
    3

    Default

    Hi,

    Current Spring Social references/samples work with Spring 3.1 .
    Could you please post any implementation reference that will work with Spring 3.0.5 ?

    Regards,
    Ray.

  5. #5
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    Good point. I will provide a Spring 3.0.5 based sample soon and let you know.
    Craig Walls
    Spring Social Project Lead

  6. #6
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    Okay, the spring-social-extending-existing-api sample now depends on Spring 3.0.5 instead of 3.1.0.M2. Since Maven favors the nearest dependency, this was just a matter of changing the Spring version. If this were built with Gradle, which favors newest dependencies, I'd have had to do a bit more to force the 3.0.5 dependency (probably using "force=true" on the Spring dependency).
    Craig Walls
    Spring Social Project Lead

  7. #7
    Join Date
    Jun 2011
    Posts
    3

    Default

    Thank you for the (quick) change. Highly appreciated.
    Would it be possible to have also "main stream" projects like the quick-start or the show-case to work with 3.0.5? (Maybe have 2 projects - one with snapshot builds and the other with latest stable version)

    The issues I had were:
    - Having Spring Security 3.0.4 with Spring Social (some maven dependencies errors)
    - Using examples in quick-start / show-case which utilize objects that does not exist in Spring 3.0.5 (Objects which do not appear in the spring-social-extending-existing-api project).

    Kindly would like to here you input.

    Regards,
    Ray.

  8. #8
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Ray,
    We created a spring-social-quickstart-30x project that's Spring Framework 3.0.5 compatible and can also be used as a point of comparison to see what's changed between 3.0.x and 3.1. The standard spring-social-quickstart remains on 3.1. See https://github.com/SpringSource/spring-social-samples.

    Keith
    Keith Donald
    Core Spring Development Team

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •