几周以来,我一直在使用eclipse的Google App Engine插件“生成云端点客户端库”,它运行良好。今天,它完全停止工作并回复“尝试生成客户端库时发生错误。有关更多详细信息,请参阅错误日志”。错误日志指示“HttpResponseException:500 Internal Server Error”。
这种情况发生在几周没有触及的代码上,昨天在Eclipse和Windows环境中都没有任何更新。
我尝试过三台计算机 - 其中一台是全新安装的Eclipse和GAE Plugin For Eclipse。然后,我通过StackOverflow阅读,似乎这个问题偶尔会在谷歌方面悄悄上升。那么,Google的另一个问题是什么?如果是这样,请尽快修复。
此外,是否有任何未来计划提供允许开发人员在本地生成代码的本地插件?或者,是否有一个网站显示该组件的状态似乎在谷歌方面被打破了?
由于
Windows 8.1 x64
Eclipse Luna (4.3)
GAE Plugin For Eclipse (3.8.0v201410302155-rel-r42)
App Engine SDK 1.9.19 and 1.8.8 (I tried both independently)
Eclipse错误信息..........
Unexpected Exception
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:122)
Caused by: com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmGenerationException: com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 500 Internal Server Error
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:201)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:320)
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: 500 Internal Server Error
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createCli entLibFromApiConfig(SwarmApiCreator.java:199)
... 4 more
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product com.android.ide.eclipse.adt.package.adtproduct
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.adtproduct -clean
答案 0 :(得分:2)
Google已回应以下解决方案: https://cloud.google.com/appengine/docs/java/endpoints/endpoints_tool#generating_a_client_library_bundle_from_a_backend_api
简而言之,假设:
然后,您可以通过执行以下操作在本地生成客户端库:
在命令提示符下,使用appengine-java-sdk更改目录
cd C:\ Eclipse \ eclipse \ plugins \ com.google.appengine.eclipse.sdkbundle_1.9.19 \ appengine-java-sdk-1.9.19 \ bin
生成库
enpoints.cmd get-client-lib --war = c:\ myproject \ war --build-system = maven --output = c:\ com.myproject.MyApiClass com.myproject.MyApiClass2
< / LI> 醇>请注意,输出到c:\要求命令提示符以管理员身份运行,并且API中的两个类由空格分隔。
此外,如果您没有提供输出,则客户端库zip文件位于您执行命令提示符的同一目录中(C:\ Eclipse \ eclipse \ plugins \ com.google.appengine.eclipse.sdkbundle_1 .9.19 \ appengine-java-sdk-1.9.19 \ bin如果你完全按照说明操作)