jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rishika (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1080) Swift container list call must explicitly specify JSON
Date Fri, 21 Apr 2017 08:36:04 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978313#comment-15978313
] 

Rishika commented on JCLOUDS-1080:
----------------------------------

We did see similar error if we provide invalid location(region) name to swift:

Exception in thread "main" java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT
at line 1 column 2 path $
	at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:351)
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:88)
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$SetTypeAdapter.read(NullFilteringTypeAdapterFactories.java:180)
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$SetTypeAdapter.read(NullFilteringTypeAdapterFactories.java:166)
	at com.google.gson.Gson.fromJson(Gson.java:805)
	at com.google.gson.Gson.fromJson(Gson.java:770)
	at com.google.gson.Gson.fromJson(Gson.java:719)
	at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:42)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:83)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:77)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:62)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:42)
	at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
	at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
	at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
	at $Proxy52.listContainers(Unknown Source)
	at org.jclouds.openstack.swift.blobstore.SwiftBlobStore.list(SwiftBlobStore.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

> Swift container list call must explicitly specify JSON
> ------------------------------------------------------
>
>                 Key: JCLOUDS-1080
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1080
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 1.9.2
>            Reporter: Zack Shoylev
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> https://stackoverflow.com/questions/35439056/jclouds-and-openstack-illegalstateexception-expected-begin-array-but-was-stri
> https://github.com/jclouds/jclouds/blob/master/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java
> https://wiki.openstack.org/wiki/MetadataSearchAPI#Output_formats
> http://developer.openstack.org/api-ref-objectstorage-v1.html
> The container list calls, in addition to the header "Accept: application/json" (which
seems to be sufficient for some providers) are required by the spec to also send ?format=json
in the URL. Not doing that seems to cause issues.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message