InvocationTargetException用appengine-gcs-client-0.5 dev_appserver存储文件 [英] InvocationTargetException storing files with appengine-gcs-client-0.5 dev_appserver
问题描述
我使用 appengine-gcs -client-0.5 ,并在调用 GcsService.createOrReplace and GcsOutputChannel.close 。
似乎对storeBlob的调用没有适当的权限,因为appserver在com.google.appengine.api.blobstore.dev.FileBlobStorage中获取了AccessControlException。 storeBlob:
java.security.AccessContr olException:access denied(java.io.FilePermission/ tmp / 1440435923000-0 / encoded_gs_key:< some key>write)
我需要做些什么才能做到这一点?
appengine-gcs -client-0.5删除了对已弃用的Files API的依赖关系,但SDK尚未获得存储文件BlobStorage服务所需的权限。作为解决方案,直到下一个SDK版本发布为止,您可以通过一个标志为Blobstore服务配置内存支持的存储,如下所示:
dev_appserver.sh - jvm_flag = -Dblobstore.no_storage = true
这只是dev_appserver必需的 - 生产应用程序不会有这个问题。
I'm using appengine-gcs-client-0.5 and seeing InvocationTargetExceptions in my dev_appserver when calling GcsService.createOrReplace and GcsOutputChannel.close.
It seems like the call to storeBlob does not have the appropriate permission, as the appserver gets an AccessControlException in com.google.appengine.api.blobstore.dev.FileBlobStorage.storeBlob:
java.security.AccessControlException: access denied ("java.io.FilePermission" "/tmp/1440435923000-0/encoded_gs_key:<some key>" "write")
What do I need to do to get this working?
appengine-gcs-client-0.5 removed a dependency on the deprecated Files API, but the SDK does not yet acquire the necessary permissions to store files the BlobStorage service. As a workaround until the next SDK version is released, you can pass a flag to configure a memory-backed store for the Blobstore service like so:
dev_appserver.sh --jvm_flag=-Dblobstore.no_storage=true
This is only necessary for the dev_appserver - production applications will not have this problem.
这篇关于InvocationTargetException用appengine-gcs-client-0.5 dev_appserver存储文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!