GoogleCloudPlatform / appengine-gcs-client

App Engine-Cloud Storage custom client library
Apache License 2.0
126 stars 112 forks source link

NullPointerException #81

Open elharo opened 4 years ago

elharo commented 4 years ago

See https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/100#issuecomment-535135004 for history

Caused by: java.lang.NullPointerException at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.(LocalRawGcsService.java:124) at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.getInstance(LocalRawGcsService.java:185) at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.access$000(LocalRawGcsService.java:110) at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.ensureInitialized(LocalRawGcsService.java:195) at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.readObjectAsync(LocalRawGcsService.java:458) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl.requestBlock(PrefetchingGcsInputChannelImpl.java:107) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl.waitForFetch(PrefetchingGcsInputChannelImpl.java:166) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl.access$000(PrefetchingGcsInputChannelImpl.java:43) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl$1.call(PrefetchingGcsInputChannelImpl.java:136) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl$1.call(PrefetchingGcsInputChannelImpl.java:134) at com.google.appengine.tools.cloudstorage.RetryHelper.doRetry(RetryHelper.java:108) at com.google.appengine.tools.cloudstorage.RetryHelper.runWithRetries(RetryHelper.java:166) at com.google.appengine.tools.cloudstorage.RetryHelper.runWithRetries(RetryHelper.java:156) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl.waitForFetchWithRetry(PrefetchingGcsInputChannelImpl.java:134) at com.google.appengine.tools.cloudstorage.PrefetchingGcsInputChannelImpl.read(PrefetchingGcsInputChannelImpl.java:212) at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65) at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109) at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103) at java.io.InputStream.read(InputStream.java:101) at com.lm2a.appe.img.GcsExampleServlet.copy(GcsExampleServlet.java:113) at com.lm2a.appe.img.GcsExampleServlet.doGet(GcsExampleServlet.java:77)

ludoch commented 4 years ago

Hi, env: flex does not support at all the com.google.appengine.api* APIs, and I see a import com.google.appengine.api.blobstore.BlobKey; statement, so it will never work, and not documented to work. Secondly, com.google.appengine.tools.cloudstorage from the repo above is also version 0.8 and not a supported GA product.

Please use the GA, Supported Cloud Java APIs from: https://github.com/googleapis/google-cloud-java that work on GAE Standard and Flex and are fully supported. It includes a GCS library, see https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage

elharo commented 4 years ago

I don't think we've ever made a formal statement that pre-1.0 means not supported, or that this product is not supported. Assuming that's the case we should probably release an 0.9 that is deprecated, and archive the repo.

ludoch commented 4 years ago

Elliotte, please coordinate with a GCP PM for communication issues,