Open trisberg opened 9 years ago
For the record, Spring 4.1 requires Http-Components 4.3 as a minimum version.
Hi guys,
There is a similar problem when using the spring-social-core-1.0.0 along with the spring android modules. Android comes with an outdated version of ord.apache.http.client
. If you don't include a more recent version such as the Android port of the library, you get a ClassNotFound exception because some classes are not available in the old version.
So maybe it's possible to beef up the HTTP_COMPONENTS_AVAILABLE
check to ensure the proper version is available?
Thanks
ClientHttpRequestFactorySelector checks for the existence of "org.apache.http.client.HttpClient" but Spring 4.x also requires "org.apache.http.config.Lookup" class which doesn't exist in httpclient 4.2.5 so the app fails with a NoClassDefFoundException. Maybe you could add a check for that class as well, and if not found use the SimpleClientHttpRequestFactory instead.
We don't have much control of the classpath, so we can't easily upgrade to httpclient-4.3.x, this is running inside Hadoop YARN where httpclient-4.2.5 is already on the classpath.
Stacktrace: