Uploaded image for project: 'Apache Oltu'
  1. Apache Oltu
  2. OLTU-191

Get resource fails with NPE

    XMLWordPrintableJSON

Details

    Description

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

      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)
      	...
      

      To reproduce:

      1. start the demo client
      2. do the authorize flow for Facebook
      3. 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.

      Attachments

        Issue Links

          Activity

            People

              steinwelberg Stein Welberg
              jasha Jasha Joachimsthal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: