0

I'm using spring social in my project. I already completed integration with facebook and twitter, but had trouble with linkedin.

if I try create connection:

Connection <LinkedIn> connection = connectionFactory.createConnection(accessToken);

then I have this exception:

java.lang.NoSuchMethodError: org.codehaus.jackson.map.SerializationConfig.withSerializationInclusion(Lorg/codehaus/jackson/map/annotate/JsonSerialize$Inclusion;)Lorg/codehaus/jackson/map/SerializationConfig;

I already tried use different versions of spring-social-linkedin and different version of jackson lib (v 1.9.2 and above) but unsuccessful.

Can anyone tell me how resolve this trouble?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Andrey
  • 1

1 Answers1

0

The method is available since v1.9 of the API.

The only reason this can happen is that you are compiling against the right libraries at compile time, but at runtime this method is unavailable. There is a stale version (< 1.9) of the library on your classpath somewhere.

withSerializationInclusion

public SerializationConfig withSerializationInclusion(JsonSerialize.Inclusion incl)
Since:
1.9
Deepak Bala
  • 11,095
  • 2
  • 38
  • 49
  • i checked all pom file and didn't find using of stale version of the lib. War file contain only one version of jackson lib - jackson-core-asl-1.9.3.jar and jackson-mapper-asl-1.9.3.jar. But trouble are still exist. – Andrey Apr 11 '13 at 11:40
  • What about the server classpath ? The stale jar may not be loaded by your WAR but by a parent classloader. – Deepak Bala Apr 11 '13 at 11:42