users@jersey.java.net

[Jersey] Re: oauth-signature matching Javadoc/JAR ?

From: Martin Matula <martin.matula_at_oracle.com>
Date: Fri, 23 Dec 2011 12:29:02 +0100

Hi Arun,
Yes, unfortunately this is what many people run into. Please see this issue for some background: http://java.net/jira/browse/JERSEY-772
You have several options:
1) override the bundled version of jersey with jersey 1.11 in your war file - here is how to do it: http://jersey.java.net/nonav/documentation/latest/glassfish.html
2) use the version of oauth libraries matching the version of jersey bundled in gf 3.1.1
3) or copy-paste META-INF/services folder from the oauth jars into your war
Regards,
Martin

On Dec 23, 2011, at 4:35 AM, Arun Gupta wrote:

> Hi Martin,
>
> With the following <dependencies>:
>
> <dependency>
> <groupId>com.sun.jersey.contribs.jersey-oauth</groupId>
> <artifactId>oauth-client</artifactId>
> <version>1.11</version>
> </dependency>
> <dependency>
> <groupId>com.sun.jersey.contribs.jersey-oauth</groupId>
> <artifactId>oauth-signature</artifactId>
> <version>1.11</version>
> </dependency>
>
> the app is throwing the following exception:
>
> Caused by: com.sun.jersey.oauth.signature.UnsupportedSignatureMethodException: HMAC-SHA1
> at com.sun.jersey.oauth.signature.OAuthSignature.getSignatureMethod(OAuthSignature.java:257)
> at com.sun.jersey.oauth.signature.OAuthSignature.generate(OAuthSignature.java:92)
> at com.sun.jersey.oauth.signature.OAuthSignature.sign(OAuthSignature.java:108)
> at com.sun.jersey.oauth.client.OAuthClientFilter.handle(OAuthClientFilter.java:311)
> ... 32 more
>
> The app is deployed on GlassFish Server Open Source Edition 3.1.1 (build 12).
>
> Any idea ?
>
> -Arun
>
> On 12/22/11 5:10 PM, Martin Matula wrote:
>> Hi Arun,
>> See here: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.sun.jersey.contribs.jersey-oauth%22%20AND%20a%3A%22oauth-signature%22
>> Martin
>>
>> On Dec 23, 2011, at 12:24 AM, Arun Gupta wrote:
>>
>>> Where can I find the JARs corresponding to the API at:
>>>
>>> http://jersey.java.net/nonav/apidocs/latest/contribs/jersey-oauth/oauth-signature/index.html
>>>
>>> None of the versions at:
>>>
>>> http://download.java.net/maven/2/com/sun/jersey/oauth/oauth-signature/
>>>
>>> seem to match. I'm particularly interested in setting the callback.
>>>
>>> -Arun
>>>
>>> --
>>> http://twitter.com/arungupta
>>> http://blogs.oracle.com/arungupta
>>>
>
> --
> http://twitter.com/arungupta
> http://blogs.oracle.com/arungupta
>