Here is what I'm using to build the context:

String provider = System.getProperty("provider.cs", rackspaceprovider);
       String endpoint = "https://identity.api.rackspacecloud.com/v2.0/";;
       String username = usernames;
       String credential = apikey;
       try{
       ComputeServiceContext context = ContextBuilder.newBuilder(provider)
       .endpoint(endpoint)
               .credentials(username, credential)
               .modules(ImmutableSet.of(new
OkHttpCommandExecutorServiceModule(), new SLF4JLoggingModule()))
               .buildView(ComputeServiceContext.class);
       computeService = context.getComputeService();
       nova = context.unwrap();

Then here is the snippet where the error
occurs: nova.getApi().getConfiguredZones()

So the context and the novaApi build fine, but when I call the
getconfiguredzones it produces the error.

I can't seem to get enable logging since I'm using Android and it produces
errors when trying to use ch.qos.logback. I will see if I can enable it so
I can get the log. Thank you.


On Fri, Apr 18, 2014 at 3:22 PM, Everett Toews
<[email protected]>wrote:

>  Hi Jeremiah,
>
>  In cases of JSON parsing problems we really need to see the wire
> logging, here’s how to configure logging [1]. The file we
> need log/jclouds-wire.log.
>
>  Also, it would be helpful to see a full example that demonstrates the
> problem. Or at least a snippet that shows how you’re building your Context
> and what you’re calling afterwards that’s causing the problem.
>
>  Thanks,
> Everett
>
>  [1] http://jclouds.apache.org/reference/logging/
>
>
>  On Apr 18, 2014, at 2:10 PM, Jeremiah Robertson <[email protected]> wrote:
>
>  Yes, I'm using jclouds 1.7.1 and I'm using rackspace-cloudservers-us as
> the provider. And at the base level I'm
> calling nova.getApi().getConfiguredZones(). I also attached the stack
> trace. It produces the BEGIN_ARRAY but BEGIN_OBJECT was expected error
> because it should be using the Deserialization adapter.
>
>
> On Fri, Apr 18, 2014 at 3:03 PM, Ignasi Barrera <[email protected]> wrote:
>
>> Hi Jeremiah,
>>
>> Which version of jclouds and which provider are you using?
>>
>> And could you share too which api class and method are you calling when
>> you get the parsing failure? A stacktrace will help!
>>
>> I.
>> El 18/04/2014 20:59, "Jeremiah Robertson" <[email protected]> escribió:
>>
>>  I have a jclouds parsing error. Jclouds tries to parse the following
>>> JSON (except with values for the username and credential; I just removed
>>> them for this example):
>>> {auth{RAX-KSKEY:apiKeyCredentials={username="",apiKey=""}}}
>>>
>>>  It tries to parse it using the CollectionTypeAdapterFactory in the
>>> gson package which is wrong because it should be using the
>>> DeserializationConstructorAndReflectiveTypeAdapterFactory in the jclouds
>>> core. The type token used to find the adapter is correct though:
>>> org.jclouds.openstack.keystone.v2_0.domain.Access of Class<T>.
>>>
>>>  So I'm not sure why it's receiving the wrong adapter. Any ideas?
>>>
>>>  Thank you,
>>>
>>>  --
>>> Jeremiah Robertson
>>> Georgia Tech
>>> Aerospace Engineering
>>>
>>
>
>
>  --
> Jeremiah Robertson
> Georgia Tech Junior
> Aerospace Engineering
> Grand Challenges Program
> [email protected]
> 417.207.1563
> <log.txt>
>
>
>


-- 
Jeremiah Robertson
Georgia Tech Junior
Aerospace Engineering
Grand Challenges Program
[email protected]
417.207.1563

Reply via email to