Question

I am using scribe 1.3.0 for OATH authentication. This is on Tomcat 7 under Ubuntu.

I am pretty sure this is some sort of a pilot error but cannot figure out what is wrong exactly...

I create the service and token in the constructor of my client class:

public Client()
{
  m_service = new ServiceBuilder()
                       .provider(Api.class)
                            .apiKey(CONSUMER_KEY)
                            .apiSecret(CONSUMER_SECRET)
                            .debug()
                            .build();
 m_accessToken = new Token(OAUTH_TOKEN, OAUTH_TOKEN_SECRET);
}

Later on when time comes to make a request I use the service in a function:

OAuthRequest request = new OAuthRequest(Verb.GET,
                url);
m_service.signRequest(m_accessToken, request);

Since I added the debug() tag to the ServiceBuilder I get the following output:

signing request: URL
setting token to: Token[xxxx , xxxxx]
generating signature...

thats it.. nothing else happens, the code just seems to die there. I tried to catch Exception from the m_service call but it does not throw exception. I had tried this code before on a different Windows machine with Jetty and it worked but I dont have access to that machine or OS anymore..

What could I be doing wrong? Is there anything else I can do to get more debug output?

-Wish

Was it helpful?

Solution

Turns out that I needed to include the apache codec jar files in Tomcat.

I did go back to try my app on Jetty again under Windows, that worked without the codec. I am not entirely sure why linux+Tomcat needs apache codec while Jetty+Windows7 does not..

If I had Maven would not have this issue..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top