Question

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.

That's the scenario.

  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).

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

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

And the stacktrace is this one:

> 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

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.

Can you please help me? Thank you

Was it helpful?

Solution

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

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 )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top