0
votes

I am building some business APIs using Google Cloud Endpoints with Google Cloud SDK 1.9.48 on Eclipse Mars(4.5). I have been deploying them on app engine and test using api explorer. We were adding more apis for some time and everything worked fine.One odd day, we observed strange behaviour that is posing as blocker for us. Deployment of endpoints failed, though application gets deployed. Deployment halts for some 2-3 mins(seems connecting to remote Endpoint server.), then goes ahead ignoring the failure of endpoints. Deployment of endpoints fails with following log on Eclipse console:

... Verifying availability:

Will check again in 1 seconds.
Will check again in 2 seconds.
Will check again in 4 seconds.
Will check again in 8 seconds.
Will check again in 16 seconds.
Will check again in 32 seconds.
Will check again in 60 seconds.
Endpoints configuration not updated.  The app returned an error when the Google Cloud Endpoints server attempted to communicate with it.
See the deployment troubleshooting documentation for more information: https://developers.google.com/appengine/docs/java/endpoints/test_deploy#troubleshooting_a_deployment_failure
Ignoring Endpoints failure and proceeding with update.
Closing update: new version is ready to start serving.

At app engine logs, following are the errors logged:

/_ah/spi/BackendService.getApiConfigs java.lang.NullPointerException at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:102) at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ...

Uncaught exception from servlet java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode at com.google.api.server.spi.SystemService$Builder.withDefaults(SystemService.java:517) at com.google.api.server.spi.SystemServiceServlet.createSystemService(SystemServiceServlet.java:133) ...

The troubleshooting link provided here, does not help much. I doubt, some of my endpoints may cause this failure but, commenting endpoints classes in any order does not help. Particularly, logs donot help me locate the errorneous api class.

1

1 Answers

0
votes

I had this issue:

  1. Check if your web.xml and servlet class is well mapped.
  2. Check if one of your classes creates an object of another class (In my case it was Dao classes) and both have the same Objectify object.... [basically if you have class1 and in it if you are creating an object of class2 (lets say class1Dao and class2Dao) and both have the same Objectify objcty=..... then it occurs as the google cloud endpoints server gets confused]

It helped in my case... basically i did a very rude solution, i deleted the class2Dao object instantiation from Class1Dao and cut-pasted the method from class2Dao to class1Dao which i previously was accessing from Class1Dao.

Alternate solution would be changing the name of the Objectify object.

example:

Objectify objctfy1=.... in class1 and Objectify objctfy2=.... in class2

Hope this helps, I am bad in explaining :)