This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Comment

Dear Craig Walls (habuma),
Thanks for your reply. I was just thinking, this solution may not be correct though it worked. Ideally i need to get the latest Spring-web which contains StringHttpMessageConverter which i am going to try next. Please correct me if i am wrong.

Comment

hi,
i can only think of one possible reason. Your local repository might have different versioned jars which might have downloaded when you had mentioned earlier version than above. Just try deleting them (all spring related jars) so that build would download fresh jars and try again. Good luck

Comment

Breaking this away from Spring Social itself (because it's not technically a problem with Spring Social...that's just where you see it manifested), the question is this: Does StringHttpMessageConverter have a constructor that accepts a Charset as a parameter? Because that's what it's complaining about...that the constructor doesn't exist.

The answer is yes. It wasn't there in Spring 3.0.x, but it is there by the time Spring 3.1.4 came along and is still there in Spring 3.2.x. Therefore if you say that you have Spring 3.1.4 in your classpath, then that constructor should be there.

Nevertheless, there is one way that you could have Spring 3.1.4 in your classpath and still get that exception: If some older version of Spring is also in your classpath. Specifically, if there's an older version of the spring-web module, then this could be a problem. In that case, there are two versions of that library in the classpath and what's happening is that the classloader is loading StringHttpMessageConverter from the older JAR file and not the newer one.

Since you're using Maven to do your build, you can check this by viewing the dependency tree. Simply do "mvn dependency:tree" from the command line and review the tree, looking for older versions of Spring. What's probably happening is that one of your other dependencies has a dependency on an older version of Spring and is pulling that in transitively.

Also, the fact that you're using version 1.0.1.RELEASE of Spring Social Twitter is probably going to cause you trouble when you use it alongside 1.1.0.M2 of Spring Social. You might want to check that.

Comment

Again, I say that the problem isn't with the versions you explicitly declare...it's with the version that are pulled in transitively. Spring Social needs the version of StringHttpMessageConverter that takes a Charset as a parameter, but it's finding an older version (likely, pulled in transitively from some other dependency). At the command line do "mvn dependency:tree" and look to see what versions of spring-web get resolved.

If you're still stuck, post the results of "mvn dependency:tree" here and I'll help find the problem.