1

During the last days I keep getting this error while trying to generate cloud endpoint library within Eclipse.

Here's the full error log:

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)

At first I thought it was my fault, but now I recreated a simple app-engine back-end project from android project but still the same problem.

Please help me I'm on schedule and this is taking me so loooong.

If I try to deploy on app-engine there are no problem however...

Thanks.

Dan Holevoet
  • 9,183
  • 1
  • 33
  • 49
box_alex83
  • 21
  • 5
  • This happens most frequently when one of the types used in your entity classes is unsupported. Can you provide the code for your entity classes (and also your Endpoint class) above? – Dan Holevoet Sep 26 '12 at 22:11
  • Resolved!! It was a class field issue, I've put a List and this was causing all this trouble, dear old trial & error was all that I neeeded – box_alex83 Sep 28 '12 at 15:25
  • @box_alex83 Can you explain also how you changed the class to solve the problem and not only what was the problem? – Raffo Mar 01 '13 at 10:53

2 Answers2

0

Most common problems are primitive types as either, return values or parameters. Collections are supported in sdk 1.8.2
Another source of this problem is the value of the name attribute of @Api annotation. The same exception is thrown if values contains dots or dashes. Value should match the following regex [a-z]+[A-Za-z0-9]* as stated in https://developers.google.com/appengine/docs/java/endpoints/annotations

Hope it helps

Gus Vargas
  • 31
  • 4
0

In my case, the problem was using the wrong HTTP Method for one of the APIs. By mistake, I set httpMethod attribute of one of the methods to "UPDATE" but there is not such HTTP method. I changed it to HttpMethod.POST and the 503 Server Error is gone.

NOTE: Always use com.google.api.server.spi.config.ApiMethod.HttpMethod to set the httpMethod attributes.

user2292916
  • 261
  • 1
  • 4
  • 12