生成API元数据云端点类失败 [英] Generating the API metadata for Cloud Endpoints classes failed

查看:174
本文介绍了生成API元数据云端点类失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个后端我的谷歌应用程序引擎Android应用程序从几个月现在就要。一切工作相当不错,直到昨天。 我并没有产生终点在过去2个月,但是当我试图这样做昨天的错误出现了。

I am working on a backend for my android app on google appengine from months up to now. Everything was working quite good until yesterday. I have not generated endpoint in last 2 months but when I tried to do so yesterday the error showed up.

这是该方案。

  1. 从Android的IDE(Eclipse的4.2)我点击生成云终端 客户端库。
  2. 我要等待的时间数量较大...
  3. 在错误出现(我将粘贴下面的堆栈跟踪)。
  1. From Android IDE (Eclipse 4.2) I click on 'Generate cloud endpoint client library'.
  2. I have to wait a BIG amount of time...
  3. The error appear (I will paste the stacktrace below).

期望的输出 - >一切OK了,在我的Andr​​oid项目我的新端点库
实际输出 - >(以下堆栈跟踪)

Expected output -> all ok and my new endpoint library in my android project.
Actual output -> (stacktrace below).

我正在一台机器上使用Ubuntu 13.04 64位。 我曾尝试与3个不同版本的应用程序引擎的SDK(1.9.2,1.9.3,1.9.4)

I'm working on a machine with Ubuntu 13.04 64bit. And I have tried with 3 different versions of appengine sdk ( 1.9.2 ,1.9.3, 1.9.4 )

报告的问题是这样的一种:

The problem reported is this one:

> com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 400 Bad Request
{"error": {"message": "Bad Request", "code": 400, "errors": [{"message": "api exception", "debug_info": "Cannot decode JSON Schema for: {u'parameterName': u'resource'}"}]}}    *AppName*-AppEngine     Unknown Google App Engine Cloud Endpoints Problem Marker

和堆栈跟踪是这个:

> java.lang.reflect.InvocationTargetException
    at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:82)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmGenerationException: com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 400 Bad Request
{"error": {"message": "Bad Request", "code": 400, "errors": [{"message": "api exception", "debug_info": "Cannot decode JSON Schema for: {u'parameterName': u'resource'}"}]}}
    at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:144)
    at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
    at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
    at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
    ... 1 more
Caused by: com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 400 Bad Request
{"error": {"message": "Bad Request", "code": 400, "errors": [{"message": "api exception", "debug_info": "Cannot decode JSON Schema for: {u'parameterName': u'resource'}"}]}}
    at com.google.appengine.repackaged.com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1054)
    at com.google.api.server.spi.tools.CloudClientLibGenerator.postRequest(CloudClientLibGenerator.java:53)
    at com.google.api.server.spi.tools.CloudClientLibGenerator.generateClientLib(CloudClientLibGenerator.java:44)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:142)
    ... 4 more

我已经试过很多次清理并生成项目,并手动删除旧的* .API *夏卓前一个新的版本,但似乎没有任何工作文件。

I have tried many times to clean and build the project and to delete manually old *.api *.discovery files before a new build but nothing seems to work.

你能帮帮我吗?谢谢

推荐答案

在最后,我已经解决了我的问题。 错误是在一个方法在于有作为一个参数的端点之一 com.google.appengine.api.datastore.Blob

In the end I have resolved my problem. The error was in a method in one of the endpoints that had as a parameter a com.google.appengine.api.datastore.Blob

要找到我手动执行的问题(从终端)创立的云终端库,能够看到输出的一些更详细的路线等搞清楚这是有麻烦的端点。 (要了解如何操作请阅读生成使用endpoint.sh的android客户端库的的)

To find the problem I executed manually (from a terminal) the creation of the cloud endpoint library, being able to see few more detailed line of output and so figuring out the endpoint that was having troubles. (To understand how to do so read the section "Generating a client library for android using endpoint.sh" there )

这篇关于生成API元数据云端点类失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆