Google App引擎图像转换来自本地tomcat服务器的问题

时间:2017-06-13 14:18:38

标签: google-app-engine cloud

我正在尝试使用BlobstoreServiceFactory转换图像。

代码在Google云应用引擎上运行良好。但是,当我从本地tomcat服务器运行代码时,它会抛出以下内容。

我在系统环境变量中设置了服务帐户json文件。我可以从eclipse中读取存储桶内容,但在转换时获得以下异常。请帮忙..

for (StorageObject object : bucketContents) {

// Error coming from this line:

BlobKey blobKey = blobstoreService.createGsBlobKey("/gs/" + bucket + "/" + object.getName());

Image blobImage = ImagesServiceFactory.makeImageFromBlob(blobKey);
Transform resize1 = ImagesServiceFactory.makeResize(width, height);
Image resizeImage1 = imagesService.applyTransform(resize1, blobImage);

}

异常详情

com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call blobstore.CreateEncodedGoogleStorageKey in a thread that is neither the original request thread nor a thread created by ThreadManager.

0 个答案:

没有答案