无论我是尝试手动生成库还是在运行应用程序后,都会出现错误:

 {
 "error": {
 "errors": [
  {
"domain": "global",
"reason": "invalid",
"message": "Invalid Value"
  }
 ] ,
  "code": 400,
 "message": "Invalid Value"
 }
}


在Eclipse中的错误日志中,我也看到了以下内容,但仅在运行应用程序资源管理器之后:

java.lang.reflect.InvocationTargetException
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:85)
...
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": {
  "errors": [
  {
  "domain": "global",
  "reason": "invalid",
"message": "Invalid Value"
 }
 ],
 "code": 400,
 "message": "Invalid Value"
 }
}

at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.generateAndWriteDiscovery(SwarmApiCreator.java:307)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:96)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:252)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:471)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:83)
... 37 more


当我进行实时部署时,我会看到除一个端点外的所有端点,因此我认为问题出在这里,但是我看不到任何异常,并且错误日志也没有抱怨。调试此问题的最佳方法是什么?

最佳答案

经过大量挖掘,我找到的答案是我有一个端点,其名称中带有大写字母。显然,您可以执行此操作。无论如何,真正调试的方法是尝试在命令行上生成端点。实际上,它会在出现问题的类上引发错误,至少您知道要关注哪个类。

为此,请运行以下命令:

endpoints.sh get-client-lib com.class1.name com.class2.name


在Windows上,我相信

endpoints.bat

关于java - App Engine Cloud Endpoints 400部署时的无效值,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19009660/

10-10 13:50