Re: [Resteasy-users] ObjectMapper problems with Resteasy 3.0 beta5

2013-06-06 Thread Bill Burke
Aren't you using Wildfly?  Again, I do not support Wildfly yet.

On 6/6/2013 10:47 AM, Pascal Gélinas wrote:
> Well, the stack trace clearly references Jackson 2 classes:
>
> Caused by:
> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
> Unrecognized field "access_token" (class
> org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse),
> not marked as ignorable (4 known properties: , "token", "expiresIn",
> "tokenType", "refreshToken"])
>   at [Source:
> org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream@934ef4;
> line: 1, column: 18] (through reference chain:
> org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse["access_token"])
> at
> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1159)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1179) 
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:635)
> [jackson-databind-2.2.1.jar:2.2.1]
> at
> org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:120)
> [resteasy-jackson2-provider-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:45)
> [resteasy-jaxrs-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(DigitalVerificationInterceptor.java:32)
> at
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:48)
> [resteasy-jaxrs-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)
> [resteasy-jaxrs-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:48)
> [resteasy-jaxrs-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:191)
> [resteasy-client-3.0-beta-5.jar:]
> ... 17 more
>
> something somewhere is making use of Jackson 2, but the classes are
> annotated for Jackson 1. And the reason that his ObjectMapper context
> resolver isn't being called is that it provides a Jackson 1
> ObjectMapper, but the runtime requires a Jackson 2.
>
> On 06/05/2013 01:24 PM, Bill Burke wrote:
>> Skeleton Key still uses Jackson 1.9.x
>>
>> On 6/4/2013 2:25 PM, Pascal Gélinas wrote:
>>> Just thaught I'd chip in: I've seen in your class that you are using the
>>> old annotations (JsonProperty) from the old package
>>> org.codehaus.jackson.*. The new packages are com.fasterxml.jackson.*, so
>>> make sure to use those; the class names haven't changed, but the
>>> packages did. That can cause some confusing when you've got both version
>>> on the compile classpath.
>>>
>>> I'm also pretty sure that your CustomObjectMapperProvider provides an
>>> old ObjectMapper from the codehaus packages.
>>>
>>> HTH
>>> --
>>> Pascal Gélinas | Software Developer
>>> *Nu Echo Inc. *
>>> 1435, Saint-Alexandre, Suite 200, Montreal (Qc),Canada, H3A 2G4
>>> Tel: (514) 861-3246 ext 4234 | FAX: (514) 861-1676
>>> pascal.geli...@nuecho.com    |
>>> www.nuecho.com    | blog.nuecho.com
>>> 
>>>
>>> *Because performance matters. *
>>>
>>>
>>> On 05/25/2013 06:20 PM, Charles wrote:
 Hi,

 I am using Resteasy 3.0-beta5 Skeleton Key in my project. I have setup
 the whole thing...SSL certs, skeleton key config and so on. I am using
 the OAuthManagedResourceValve to secure a jax-rs API. After
 authentication from the sso server, I get the following exception.

 00:07:15,581 INFO  [org.jboss.as] (Controller
 Boot Thread) JBAS015874: WildFly 8.0.0.Alpha1 "WildFly" started in
 29220ms - Started 1153 of 1247 services (228 services are lazy,
 passive or on-demand)
 00:07:25,144 INFO
   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
 (ajp-/192.168.1.101:8009-1) --- invoke: /login.jsp
 

Re: [Resteasy-users] ObjectMapper problems with Resteasy 3.0 beta5

2013-06-06 Thread Pascal Gélinas

Well, the stack trace clearly references Jackson 2 classes:

Caused by: 
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "access_token" (class 
org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse), 
not marked as ignorable (4 known properties: , "token", "expiresIn", 
"tokenType", "refreshToken"])
 at [Source: 
org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream@934ef4; 
line: 1, column: 18] (through reference chain: 
org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse["access_token"])
at 
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1159) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1179) [jackson-databind-2.2.1.jar:2.2.1]
at 
com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:635) 
[jackson-databind-2.2.1.jar:2.2.1]
at 
org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:120) 
[resteasy-jackson2-provider-3.0-beta-5.jar:]
at 
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:45) 
[resteasy-jaxrs-3.0-beta-5.jar:]
at 
org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(DigitalVerificationInterceptor.java:32)
at 
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:48) 
[resteasy-jaxrs-3.0-beta-5.jar:]
at 
org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59) 
[resteasy-jaxrs-3.0-beta-5.jar:]
at 
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:48) 
[resteasy-jaxrs-3.0-beta-5.jar:]
at 
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:191) 
[resteasy-client-3.0-beta-5.jar:]

... 17 more

something somewhere is making use of Jackson 2, but the classes are 
annotated for Jackson 1. And the reason that his ObjectMapper context 
resolver isn't being called is that it provides a Jackson 1 
ObjectMapper, but the runtime requires a Jackson 2.


On 06/05/2013 01:24 PM, Bill Burke wrote:

Skeleton Key still uses Jackson 1.9.x

On 6/4/2013 2:25 PM, Pascal Gélinas wrote:

Just thaught I'd chip in: I've seen in your class that you are using the
old annotations (JsonProperty) from the old package
org.codehaus.jackson.*. The new packages are com.fasterxml.jackson.*, so
make sure to use those; the class names haven't changed, but the
packages did. That can cause some confusing when you've got both version
on the compile classpath.

I'm also pretty sure that your CustomObjectMapperProvider provides an
old ObjectMapper from the codehaus packages.

HTH
--
Pascal Gélinas | Software Developer
*Nu Echo Inc. *
1435, Saint-Alexandre, Suite 200, Montreal (Qc),Canada, H3A 2G4
Tel: (514) 861-3246 ext 4234 | FAX: (514) 861-1676
pascal.geli...@nuecho.com    |
www.nuecho.com    | blog.nuecho.com


*Because performance matters. *


On 05/25/2013 06:20 PM, Charles wrote:

Hi,

I am using Resteasy 3.0-beta5 Skeleton Key in my project. I have setup
the whole thing...SSL certs, skeleton key config and so on. I am using
the OAuthManagedResourceValve to secure a jax-rs API. After
authentication from the sso server, I get the following exception.

00:07:15,581 INFO  [org.jboss.as] (Controller
Boot Thread) JBAS015874: WildFly 8.0.0.Alpha1 "WildFly" started in
29220ms - Started 1153 of 1247 services (228 services are lazy,
passive or on-demand)
00:07:25,144 INFO
  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) --- invoke: /login.jsp
00:07:32,068 INFO
  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) --- invoke: /j_security_check
00:07:32,069 INFO
  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) <--- Begin oauthAuthenticate
00:07:32,140 INFO
  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenti

Re: [Resteasy-users] ObjectMapper problems with Resteasy 3.0 beta5

2013-06-05 Thread Bill Burke
Skeleton Key still uses Jackson 1.9.x

On 6/4/2013 2:25 PM, Pascal Gélinas wrote:
> Just thaught I'd chip in: I've seen in your class that you are using the
> old annotations (JsonProperty) from the old package
> org.codehaus.jackson.*. The new packages are com.fasterxml.jackson.*, so
> make sure to use those; the class names haven't changed, but the
> packages did. That can cause some confusing when you've got both version
> on the compile classpath.
>
> I'm also pretty sure that your CustomObjectMapperProvider provides an
> old ObjectMapper from the codehaus packages.
>
> HTH
> --
> Pascal Gélinas | Software Developer
> *Nu Echo Inc. *
> 1435, Saint-Alexandre, Suite 200, Montreal (Qc),Canada, H3A 2G4
> Tel: (514) 861-3246 ext 4234 | FAX: (514) 861-1676
> pascal.geli...@nuecho.com  |
> www.nuecho.com  | blog.nuecho.com
> 
>
> *Because performance matters. *
>
>
> On 05/25/2013 06:20 PM, Charles wrote:
>> Hi,
>>
>> I am using Resteasy 3.0-beta5 Skeleton Key in my project. I have setup
>> the whole thing...SSL certs, skeleton key config and so on. I am using
>> the OAuthManagedResourceValve to secure a jax-rs API. After
>> authentication from the sso server, I get the following exception.
>>
>> 00:07:15,581 INFO  [org.jboss.as ] (Controller
>> Boot Thread) JBAS015874: WildFly 8.0.0.Alpha1 "WildFly" started in
>> 29220ms - Started 1153 of 1247 services (228 services are lazy,
>> passive or on-demand)
>> 00:07:25,144 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) --- invoke: /login.jsp
>> 00:07:32,068 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) --- invoke: /j_security_check
>> 00:07:32,069 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) <--- Begin oauthAuthenticate
>> 00:07:32,140 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) authenticate userSessionManage.login(): foobar
>> 00:07:32,259 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) --- sign access code
>> 00:07:32,289 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) --- build redirect
>> 00:07:32,290 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-1) <--- end oauthAuthenticate
>> 00:07:33,183 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
>> (ajp-/192.168.1.101:8009-2) --- invoke: /j_oauth_resolve_access_code
>> 00:07:33,390 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin]
>> (ajp-/192.168.1.101:8009-1) media type: application/json
>> 00:07:33,390 INFO
>>  [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin]
>> (ajp-/192.168.1.101:8009-1) Content-Type header: application/json
>> 00:07:34,810 ERROR [org.apache.catalina.connector]
>> (ajp-/192.168.1.101:8009-1) JBWEB001018: An exception or error
>> occurred in the container during the request processing:
>> org.jboss.resteasy.spi.ReaderException:
>> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
>> Unrecognized field "access_token" (class
>> org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse),
>> not marked as ignorable (4 known properties: , "token", "expiresIn",
>> "tokenType", "refreshToken"])
>>  at [Source:
>> org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream@934ef4;
>> line: 1, column: 18] (through reference chain:
>> org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse["access_token"])
>> at
>> org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:227)
>> [resteasy-client-3.0-beta-5.jar:]
>> at
>> org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:135)
>> [resteasy-client-3.0-beta-5.jar:]
>> at
>> org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:193)
>> [resteasy-jaxrs-3.0-beta-5.jar:]
>> at
>> org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:283)
>> [skeleton-key-as7-3.0-beta-5.jar:]
>> at
>> org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:272)
>> [skeleton-key-as7-3.0-beta-5.jar:]
>> at
>> org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:174)
>> [skeleton-key-as7-3.0-beta-5.jar:]
>> at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:447)
>> [jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
>> at
>> org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:137)
>> [skeleton-key-as7-3.0-beta-5.jar:]
>> at
>> org.jboss.as.web.security.SecurityContextAssociationVa

Re: [Resteasy-users] ObjectMapper problems with Resteasy 3.0 beta5

2013-06-04 Thread Pascal Gélinas
Just thaught I'd chip in: I've seen in your class that you are using the 
old annotations (JsonProperty) from the old package 
org.codehaus.jackson.*. The new packages are com.fasterxml.jackson.*, so 
make sure to use those; the class names haven't changed, but the 
packages did. That can cause some confusing when you've got both version 
on the compile classpath.


I'm also pretty sure that your CustomObjectMapperProvider provides an 
old ObjectMapper from the codehaus packages.


HTH
--
Pascal Gélinas | Software Developer
*Nu Echo Inc. *
1435, Saint-Alexandre, Suite 200, Montreal (Qc),Canada, H3A 2G4
Tel: (514) 861-3246 ext 4234 | FAX: (514) 861-1676
pascal.geli...@nuecho.com  | 
www.nuecho.com  | blog.nuecho.com 



*Because performance matters. *


On 05/25/2013 06:20 PM, Charles wrote:

Hi,

I am using Resteasy 3.0-beta5 Skeleton Key in my project. I have setup 
the whole thing...SSL certs, skeleton key config and so on. I am using 
the OAuthManagedResourceValve to secure a jax-rs API. After 
authentication from the sso server, I get the following exception.


00:07:15,581 INFO  [org.jboss.as ] (Controller 
Boot Thread) JBAS015874: WildFly 8.0.0.Alpha1 "WildFly" started in 
29220ms - Started 1153 of 1247 services (228 services are lazy, 
passive or on-demand)
00:07:25,144 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) --- invoke: /login.jsp
00:07:32,068 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) --- invoke: /j_security_check
00:07:32,069 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) <--- Begin oauthAuthenticate
00:07:32,140 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) authenticate userSessionManage.login(): foobar
00:07:32,259 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) --- sign access code
00:07:32,289 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) --- build redirect
00:07:32,290 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-1) <--- end oauthAuthenticate
00:07:33,183 INFO 
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve] 
(ajp-/192.168.1.101:8009-2) --- invoke: /j_oauth_resolve_access_code
00:07:33,390 INFO 
 [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin] 
(ajp-/192.168.1.101:8009-1) media type: application/json
00:07:33,390 INFO 
 [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin] 
(ajp-/192.168.1.101:8009-1) Content-Type header: application/json
00:07:34,810 ERROR [org.apache.catalina.connector] 
(ajp-/192.168.1.101:8009-1) JBWEB001018: An exception or error 
occurred in the container during the request processing: 
org.jboss.resteasy.spi.ReaderException: 
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "access_token" (class 
org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse), 
not marked as ignorable (4 known properties: , "token", "expiresIn", 
"tokenType", "refreshToken"])
 at [Source: 
org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream@934ef4; 
line: 1, column: 18] (through reference chain: 
org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse["access_token"])
at 
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:227) 
[resteasy-client-3.0-beta-5.jar:]
at 
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:135) 
[resteasy-client-3.0-beta-5.jar:]
at 
org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:193) 
[resteasy-jaxrs-3.0-beta-5.jar:]
at 
org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:283) 
[skeleton-key-as7-3.0-beta-5.jar:]
at 
org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:272) 
[skeleton-key-as7-3.0-beta-5.jar:]
at 
org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:174) 
[skeleton-key-as7-3.0-beta-5.jar:]
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:447) 
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at 
org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:137) 
[skeleton-key-as7-3.0-beta-5.jar:]
at 
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) 
[wildfly-web-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) 
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja

Re: [Resteasy-users] ObjectMapper problems with Resteasy 3.0 beta5

2013-05-27 Thread Bill Burke
I have not tested Skeleton key with Wildfly nor the Jackson2 provider. 
I had some classloading issues when trying to use Jackson2 with AS7 and 
Resteasy so I never changed Skeleton key to use Jackson2.

Getting Skeleton key to work with Wildfly is on my todo list, but I'm 
currently working on passing the TCK.

On 5/25/2013 6:20 PM, Charles wrote:
> Hi,
>
> I am using Resteasy 3.0-beta5 Skeleton Key in my project. I have setup
> the whole thing...SSL certs, skeleton key config and so on. I am using
> the OAuthManagedResourceValve to secure a jax-rs API. After
> authentication from the sso server, I get the following exception.
>
> 00:07:15,581 INFO  [org.jboss.as ] (Controller Boot
> Thread) JBAS015874: WildFly 8.0.0.Alpha1 "WildFly" started in 29220ms -
> Started 1153 of 1247 services (228 services are lazy, passive or on-demand)
> 00:07:25,144 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) --- invoke: /login.jsp
> 00:07:32,068 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) --- invoke: /j_security_check
> 00:07:32,069 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) <--- Begin oauthAuthenticate
> 00:07:32,140 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) authenticate userSessionManage.login(): foobar
> 00:07:32,259 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) --- sign access code
> 00:07:32,289 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) --- build redirect
> 00:07:32,290 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-1) <--- end oauthAuthenticate
> 00:07:33,183 INFO
>   [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
> (ajp-/192.168.1.101:8009-2) --- invoke: /j_oauth_resolve_access_code
> 00:07:33,390 INFO
>   [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin]
> (ajp-/192.168.1.101:8009-1) media type: application/json
> 00:07:33,390 INFO
>   [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin]
> (ajp-/192.168.1.101:8009-1) Content-Type header: application/json
> 00:07:34,810 ERROR [org.apache.catalina.connector]
> (ajp-/192.168.1.101:8009-1) JBWEB001018: An exception or error occurred
> in the container during the request processing:
> org.jboss.resteasy.spi.ReaderException:
> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
> Unrecognized field "access_token" (class
> org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse),
> not marked as ignorable (4 known properties: , "token", "expiresIn",
> "tokenType", "refreshToken"])
>   at [Source:
> org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream@934ef4;
> line: 1, column: 18] (through reference chain:
> org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse["access_token"])
> at
> org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:227)
> [resteasy-client-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:135)
> [resteasy-client-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:193)
> [resteasy-jaxrs-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:283)
> [skeleton-key-as7-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:272)
> [skeleton-key-as7-3.0-beta-5.jar:]
> at
> org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:174)
> [skeleton-key-as7-3.0-beta-5.jar:]
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:447)
> [jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
> at
> org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:137)
> [skeleton-key-as7-3.0-beta-5.jar:]
> at
> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
> [wildfly-web-8.0.0.Alpha1.jar:8.0.0.Alpha1]
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
> [jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
> [jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:559) 
> [jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
> [jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
> [jbossweb-8.0.0.Alpha1.

[Resteasy-users] ObjectMapper problems with Resteasy 3.0 beta5

2013-05-25 Thread Charles
Hi,

I am using Resteasy 3.0-beta5 Skeleton Key in my project. I have setup the
whole thing...SSL certs, skeleton key config and so on. I am using
the OAuthManagedResourceValve to secure a jax-rs API. After authentication
from the sso server, I get the following exception.

00:07:15,581 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874:
WildFly 8.0.0.Alpha1 "WildFly" started in 29220ms - Started 1153 of 1247
services (228 services are lazy, passive or on-demand)
00:07:25,144 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) --- invoke: /login.jsp
00:07:32,068 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) --- invoke: /j_security_check
00:07:32,069 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) <--- Begin oauthAuthenticate
00:07:32,140 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) authenticate userSessionManage.login(): foobar
00:07:32,259 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) --- sign access code
00:07:32,289 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) --- build redirect
00:07:32,290 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-1) <--- end oauthAuthenticate
00:07:33,183 INFO
 [org.jboss.resteasy.skeleton.key.as7.OAuthAuthenticationServerValve]
(ajp-/192.168.1.101:8009-2) --- invoke: /j_oauth_resolve_access_code
00:07:33,390 INFO  [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin]
(ajp-/192.168.1.101:8009-1) media type: application/json
00:07:33,390 INFO  [org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin]
(ajp-/192.168.1.101:8009-1) Content-Type header: application/json
00:07:34,810 ERROR [org.apache.catalina.connector] (ajp-/192.168.1.101:8009-1)
JBWEB001018: An exception or error occurred in the container during the
request processing: org.jboss.resteasy.spi.ReaderException:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
Unrecognized field "access_token" (class
org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse), not
marked as ignorable (4 known properties: , "token", "expiresIn",
"tokenType", "refreshToken"])
 at [Source:
org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream@934ef4;
line: 1, column: 18] (through reference chain:
org.jboss.resteasy.skeleton.key.representations.AccessTokenResponse["access_token"])
at
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:227)
[resteasy-client-3.0-beta-5.jar:]
at
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:135)
[resteasy-client-3.0-beta-5.jar:]
at
org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:193)
[resteasy-jaxrs-3.0-beta-5.jar:]
at
org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:283)
[skeleton-key-as7-3.0-beta-5.jar:]
at
org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:272)
[skeleton-key-as7-3.0-beta-5.jar:]
at
org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:174)
[skeleton-key-as7-3.0-beta-5.jar:]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:447)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:137)
[skeleton-key-as7-3.0-beta-5.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
[wildfly-web-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:559)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:473)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at
org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:454)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
[jbossweb-8.0.0.Alpha1.jar:8.0.0.Alpha1]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
Caused by:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
Unrecognized field "access_token" (class
org.jboss.