You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by "Jasha Joachimsthal (JIRA)" <ji...@apache.org> on 2016/02/29 21:26:18 UTC

[jira] [Created] (OLTU-191) Get resource fails with NPE

Jasha Joachimsthal created OLTU-191:
---------------------------------------

             Summary: Get resource fails with NPE
                 Key: OLTU-191
                 URL: https://issues.apache.org/jira/browse/OLTU-191
             Project: Apache Oltu
          Issue Type: Task
          Components: demo-client, oauth2-client
            Reporter: Jasha Joachimsthal
            Assignee: Stein Welberg


A resource call in the client demo fails with an NPE on the validator.

{noformat}
2016-02-29 21:17:30.066:WARN::/get_resource
java.lang.NullPointerException
	at org.apache.oltu.oauth2.client.response.OAuthClientResponse.validate(OAuthClientResponse.java:80)
	at org.apache.oltu.oauth2.client.response.OAuthClientResponse.init(OAuthClientResponse.java:71)
	at org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory.createCustomResponse(OAuthClientResponseFactory.java:63)
	at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:115)
	at org.apache.oltu.oauth2.client.OAuthClient.resource(OAuthClient.java:81)
	at org.apache.oltu.oauth2.client.demo.controller.ResourceController.authorize(ResourceController.java:57)
	...
{noformat}

To reproduce:
# start the demo client
# do the authorize flow for Facebook
# do a resource call for https://graph.facebook.com/me

The HTTP request towards Facebook succeeds, but it response cannot be converted into an {{OAuthResourceResponse}}.

The client demo uses the {{URLConnectionClient}} implementation for {{HttpClient}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)