1

在过去的几天里,我在尝试在 Eclipse 中生成云端点库时不断收到此错误。

这是完整的错误日志:

eclipse.buildId=I20120608-1400
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

Error
Wed Sep 26 09:39:46 CEST 2012
Unexpected Exception

com.google.api.client.http.HttpResponseException: 503 Service Unavailable
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "backendError",
    "message": "Backend Error"
   }
  ],
  "code": 503,
  "message": "Backend Error"
 }
}

at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:861)
at com.google.api.server.spi.tools.CloudDiscoveryDocGenerator.postRequest(CloudDiscoveryDocGenerator.java:61)
at com.google.api.server.spi.tools.CloudDiscoveryDocGenerator.generateDiscoveryDoc(CloudDiscoveryDocGenerator.java:53)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.generateAndWriteDiscovery(SwarmApiCreator.java:217)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:177)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:169)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:190)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator$1.run(SwarmServiceCreator.java:271)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.createWebApi(SwarmServiceCreator.java:267)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction.run(GenerateSwarmApiAction.java:79)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

起初我以为是我的错,但现在我从 android 项目重新创建了一个简单的 app-engine 后端项目,但仍然是同样的问题。

请帮助我,我正在按计划进行,这让我很长时间。

如果我尝试在 app-engine 上部署,则没有问题......

谢谢。

4

2 回答 2

0

最常见的问题是原始类型,返回值或参数。sdk 1.8.2 支持集合
这个问题的另一个来源是@Api 注解的name 属性的值。如果值包含点或破折号,则会引发相同的异常。值应与https://developers.google.com/appengine/docs/java/endpoints/annotations中所述的以下正则表达式 [az]+[A-Za-z0-9]* 匹配

希望能帮助到你

于 2013-08-01T17:39:41.947 回答
0

就我而言,问题在于其中一个 API 使用了错误的 HTTP 方法。错误地,我将其中一种方法的httpMethod属性设置为“UPDATE”,但没有这样的 HTTP 方法。我将其更改为HttpMethod.POST并且503 服务器错误消失了。

注意:始终使用com.google.api.server.spi.config.ApiMethod.HttpMethod来设置 httpMethod 属性。

于 2013-10-11T00:23:14.003 回答