hi,
we been using m2 for a bit now and i figured i play around and see if i can make m3 work with our code. We are mainly using TwitterServiceProvider and FacebookServiceProvider. in new m3 there are connection factories and i've setup everything fine but it seems that someone left a big issue in regards to 3.1 classes needed in order to work i'm talking about when the rssTemplate makes a call to get a request from the factory it returns this.
I even tried to access the package leve Sprin300Oauth for backwards use but in the end they all make the same call back to get this class which extens a 3.1 only class. Was this something that slipped by or 3.1 is a must to use m3?
Caused by: java.lang.NoClassDefFoundError: org/springframework/http/client/AbstractBufferingClientHttpRequest
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader. java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java :616)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2331)
at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:976)
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1451)
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1329)
at org.springframework.social.support.HttpComponentsC lientHttpRequestFactory.createRequest(HttpComponen tsClientHttpRequestFactory.java:142)
at org.springframework.social.oauth2.Spring30OAuth2Re questFactory.createRequest(Spring30OAuth2RequestFa ctory.java:50)
any help or ways around this would be great.. i have everything set just missing this because AbstractBufferingClientHttpRequest is not in spring 3.0.5
i tried my own classes extended.. i tried stuff already in social m3 but eventually they all make a call to this guy HttpComponentsClientHttpRequest
which extends that abstract class that is not 3.0. What's the point of having these Spring300 package level classes to use if eventually they still end up making calles to the 3.1 only specific class. Seems like a big overlook.. unless i'm totally wrong and there is a simple way to define a client http request class that does not touch 3.1
Like i said i even tried to go to to the ProtectedResourceFactory method to get one that does not use
like so
private static RestTemplate version(String accessToken, OAuth2Version version) {
RestTemplate client = new RestTemplate(ClientHttpRequestFactorySelector.getR equestFactory());
if (interceptorsSupported) {
// favored
client.setInterceptors(new ClientHttpRequestInterceptor[] { new OAuth2RequestInterceptor(accessToken, version) });
} else {
// 3.0.x compatibility
client.setRequestFactory(new Spring30OAuth2RequestFactory(client.getRequestFact ory(), accessToken, version));
}
return client;
}
but this guy again seesm to to hit the 3.1 class because the first line in the method still will end up calling the class that extends
AbstractBufferingClientHttpRequest (3.1 only class)
RestTemplate client = new RestTemplate(ClientHttpRequestFactorySelector.getR equestFactory());
so what gives? can someone help me out... i have all setup except how to avoid using this class and getting the no class found exception.


Reply With Quote