I am getting an exception when signing in with linkedin (facebook, twitter work fine). I get the following exception when linkedin redirect back to website after authentication. I am not sure what is causing the problem.
Process:
1. Click on the link to sign in with linkedin
2. Sigin into linked and confirm app access
3. Linkedin redirects back to the application
Process:
1. Click on the link to sign in with linkedin
2. Sigin into linked and confirm app access
3. Linkedin redirects back to the application
Code:
Exception:
ERROR: org.springframework.social.connect.web.ProviderSignInController - Exception while completing OAuth 2 connection:
org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: No suitable constructor found for type [simple type, class org.springframework.social.linkedin.api.LinkedInProfile]: can not instantiate from JSON object (need to add/enable type information?)
at [Source: org.apache.http.conn.EofSensorInputStream@4820096a; line: 2, column: 3]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.linkedin.api.LinkedInProfile]: can not instantiate from JSON object (need to add/enable type information?)
.....
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.linkedin.api.LinkedInProfile]: can not instantiate from JSON object (need to add/enable type information?)
at [Source: org.apache.http.conn.EofSensorInputStream@4820096a; line: 2, column: 3]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:984)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:276)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2888)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2094)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:168)
... 87 more