Thanks Jeremiah, The current code is hiding the real exception. The NPE that appears in the logs is in the "servers.toString()" because the "servers" variable is null, as the *real* exception happened in the try/catch block.
The logs in the catch block, though, only print the exception message, and it would be great to have the stacktrace to see the real error. Could you add an "e.printStackTrace()" in the catch block so we can see the real stacktrace? Thanks! On 29 March 2014 15:09, Jeremiah Robertson <[email protected]> wrote: > I've attached the code along with the log file. On lines 166 and 167 of > the log.txt you can see the HTTPResponseException and null connection. The > exceptions occur on line 59 in ListServersWithFiltering.java. The app > starts with MainActivity, the user plugs in their information, passes it to > TheGUI.java, which passes the credentials to ListServersWithFiltering to > grab the server list. I'm grabbing the list in the background using > AsyncTask to make sure that the use of threads and networks isn't causing > the error since I'm using the main thread to fix the serviceloader issue in > Android (that's why the META_INF folder is in there). I followed the error > to line 200 of the NovaComputeServiceAdapter.class, which makes > HTTPrequests and I think finally leads to line 499 of > RestAnnotationprocessor.class where it builds the URI. This calls the apply > method of URI, which uses the get method in > MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.class. This > goes into the LocalCache.class in Guava to get the key, class, and loader > where a null value is probably being passed somewhere (LocalCache line > 2193) . Please let me know if you need any more info. To run it, you can > import the project into Eclipse and run MainActivity. You will probably > also need to add the jar files in /libraries to the buildpath, as well as > copy the META_INF folder from src to bin/classes right before debugging. > I'm guessing the exceptions are what is causing the NullPointerException > later in the log. Thank you! > > > On Fri, Mar 28, 2014 at 5:59 PM, Jeremy Daggett > <[email protected]>wrote: > >> Hi Jeremiah, >> >> Could you please provide us with some code and log files for this >> exception? >> >> Take a look at the "Code" and "Logs" sections on the "Report a Bug" page >> here: http://jclouds.apache.org/reference/report-a-bug/ >> >> We should be able to better assist you once we have that info, thanks! :) >> >> /jd >> >> >> On Fri, Mar 28, 2014 at 2:26 PM, Jeremiah Robertson <[email protected]>wrote: >> >>> I have a setup for using jclouds on Android, specifically for using >>> serviceloader and some other java features that don't instantly translate >>> over to Android. Anyways, I'm still getting the HTTPResponseException: null >>> connecting to POST >>> https://identity.api.rackspacecloud.com/v2.0/tokensHTTP/1.1 when trying to >>> pull down the list of servers in my rackspace >>> cloud. I'm guessing it has something to do with the URI/HTTP properties in >>> Android vs. Java but I have no idea where the change would take place or >>> exactly what causes this error to come up. I'm also getting a simultaneous >>> NullPointerException after the code finishes, so there is probably a null >>> value being sent to Guava that shouldn't be. Any help would be amazing. >>> >>> Thank you, >>> >>> -- >>> Jeremiah Robertson >>> Georgia Tech >>> Aerospace Engineering >>> >> >> > > > -- > Jeremiah Robertson > Georgia Tech Junior > Aerospace Engineering > Grand Challenges Program > [email protected] > 417.207.1563 >
