Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1419

Missing StorageClass REGIONAL for GCS buckets

    XMLWordPrintableJSON

Details

    Description

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

      SEVERE: Error parsing input: No enum constant org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
      java.lang.IllegalArgumentException: No enum constant org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
      

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

      Here is the full exception we receive:

      May 15, 2018 5:47:55 PM org.jclouds.logging.jdk.JDKLogger logError
      SEVERE: Error parsing input: No enum constant org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
      java.lang.IllegalArgumentException: No enum constant org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.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.$Proxy104.simpleUpload(Unknown Source)
      at org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.uploadMultipartPart(GoogleCloudStorageBlobStore.java:425)
      at org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:388)
      at org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:375)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      
      

      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

      Attachments

        Issue Links

          Activity

            People

              gaul Andrew Gaul
              smedavaram75 Suresh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: