Details

      Description

      When calling BlobStore.putBlob the object is created but we receive an exception

      java.lang.IllegalArgumentException: No enum constant org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.MULTI_REGIONAL
      

      In the logs we see that the server replied with

      2017-03-20 14:45:12 DEBUG main wire:56 - << " "storageClass": "MULTI_REGIONAL",[\n]"
      

      The bucket itself is defined as a "Multi-Regional" storage class (other choices available are Nearline and Coldline)

      Here is the full exception we receive:

      java.lang.IllegalArgumentException: No enum constant org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.MULTI_REGIONAL
      	at java.lang.Enum.valueOf(Enum.java:238)
      	at org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:41)
      	at org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:32)
      	at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
      	at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:272)
      	at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:184)
      	at com.google.gson.Gson.fromJson(Gson.java:861)
      	at com.google.gson.Gson.fromJson(Gson.java:826)
      	at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:55)
      	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
      	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
      	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:61)
      	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
      	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.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
      	at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
      	at com.sun.proxy.$Proxy65.multipartUpload(Unknown Source)
      	at org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.putBlob(GoogleCloudStorageBlobStore.java:240)
      	at org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.putBlob(GoogleCloudStorageBlobStore.java:212)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
      	at com.sun.proxy.$Proxy49.putBlob(Unknown Source)
      

      It looks like the list of [StorageClass enum](https://github.com/jclouds/jclouds-labs-google/blob/master/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java#L48) is incomplete

      EDIT: buckets created with Regional storage class are not working either

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 78cf479cf0b394b81191cb6fffe6a0bb526e52cd in jclouds-labs-google's branch refs/heads/master from Andrew Gaul
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;h=78cf479 ]

        JCLOUDS-1259: Add GCS multi-regional and coldline

        Show
        jira-bot ASF subversion and git services added a comment - Commit 78cf479cf0b394b81191cb6fffe6a0bb526e52cd in jclouds-labs-google's branch refs/heads/master from Andrew Gaul [ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;h=78cf479 ] JCLOUDS-1259 : Add GCS multi-regional and coldline
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 43ae590abb6924431ec20045f3f42ccc967d7593 in jclouds-labs-google's branch refs/heads/2.0.x from Andrew Gaul
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;h=43ae590 ]

        JCLOUDS-1259: Add GCS multi-regional and coldline

        Show
        jira-bot ASF subversion and git services added a comment - Commit 43ae590abb6924431ec20045f3f42ccc967d7593 in jclouds-labs-google's branch refs/heads/2.0.x from Andrew Gaul [ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;h=43ae590 ] JCLOUDS-1259 : Add GCS multi-regional and coldline
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ca75641fc0c990aa4592d0ee195ae34593dead2b in jclouds's branch refs/heads/master from Andrew Gaul
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=ca75641 ]

        JCLOUDS-1259: Add GCS multi-regional and coldline

        Show
        jira-bot ASF subversion and git services added a comment - Commit ca75641fc0c990aa4592d0ee195ae34593dead2b in jclouds's branch refs/heads/master from Andrew Gaul [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=ca75641 ] JCLOUDS-1259 : Add GCS multi-regional and coldline

          People

          • Assignee:
            gaul Andrew Gaul
            Reporter:
            frigo Francois Rigault
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development