title: Get request failing to Google Cloud Storage Object from Google Compute Engine using Java API
body: <p>I have a servlet running under GCE which reads files from Google Cloud Storage. I am able to access the bucket and list the files and other metadata associated with the bucket. However when I try to execute a get request on a given object, I get a weird JSON parsing error shown below.</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: expected numeric type but got class com.google.api.services.storage.model.StorageObject
      at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:834)</p>
  </blockquote>
  
  <p>My code is as follows</p>
  
  <pre><code>Storage.Objects.Get getObject = client.objects().get(BUCKET_NAME, "offers.txt");
  StorageObject obj=getObject.execute();
  </code></pre>
  
  <p>As soon as the execute operation is called the exception is thrown. I doesnt seem to be access related below, I can list the files and insert files into bucket.</p>
  
  <p>Any help is much appericiated</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.google.apis&lt;/groupId&gt;
    &lt;artifactId&gt;google-api-services-storage&lt;/artifactId&gt;
    &lt;version&gt;v1-rev7-1.19.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.google.api-client&lt;/groupId&gt;
    &lt;artifactId&gt;google-api-client&lt;/artifactId&gt;
    &lt;version&gt;1.18.0-rc&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
     &lt;groupId&gt;com.google.api-client&lt;/groupId&gt;
     &lt;artifactId&gt;google-api-client-servlet&lt;/artifactId&gt;
     &lt;version&gt;1.18.0-rc&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.google.http-client&lt;/groupId&gt;
    &lt;artifactId&gt;google-http-client&lt;/artifactId&gt;
    &lt;version&gt;1.18.0-rc&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.google.http-client&lt;/groupId&gt;
    &lt;artifactId&gt;google-http-client-jackson2&lt;/artifactId&gt;
    &lt;version&gt;1.18.0-rc&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.google.http-client&lt;/groupId&gt;
    &lt;artifactId&gt;google-http-client-appengine&lt;/artifactId&gt;
    &lt;version&gt;1.18.0-rc&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.google.api-client&lt;/groupId&gt;
    &lt;artifactId&gt;google-api-client-gson&lt;/artifactId&gt;
    &lt;version&gt;1.18.0-rc&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>