googlearchive / solutions-mobile-backend-starter-java Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I uploaded code to app engine and tried calling apis using api explorer. Its always showing this error:
503 Service Unavailable
Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "java.lang.NullPointerException"
}
],
"code": 503,
"message": "java.lang.NullPointerException"
}
}
Now that GCM is part of Google Play services, we can no longer get the gcm-server.jar file as detailed in the google documentation or on the documentation for this repo.
README.md references on last step a url that 404's
https://developers.google.com/cloud/samples/mbs/getting_started
Copy / Pasted from App Engine Log:
Uncaught exception from servlet
java.lang.NoClassDefFoundError: org/json/simple/parser/ParseException
at com.google.cloud.backend.spi.ProspectiveSearchServlet.doPost(ProspectiveSearchServlet.java:62)
line 62 -> Sender sender = new Sender(gcmKey);
As mentioned in other issue, I have imported the missing libraries:
I am using Eclipse Juno 4.2.2. with Android 4.3 (API 18). The message sent to the server is stored correctly in datastore, but this error keeps arising in the log.
Am I missing anything? Is any other library needed?
Can you include the jars in war/lib?
There's a small but critical bug in the sample. One of the external libraries are not exported into the final APK so the app fails during startup.
To fix this (in Eclipse) go to the Java Build Path -> Order and Export and check the box for "Google APIs". Clean and rebuild the project. The APK should now be around 724KB and run correctly.
Errors seen in the sample project:
05-21 12:32:16.246: E/dalvikvm(16042): Could not find class 'com.google.cloud.backend.android.mobilebackend.model.EntityListDto', referenced from method com.google.cloud.backend.android.CloudBackend.updateAll
05-21 12:32:16.256: W/dalvikvm(16042): Unable to resolve superclass of Lcom/google/cloud/backend/android/mobilebackend/model/EntityListDto; (39)
05-21 12:32:16.256: W/dalvikvm(16042): Link of class 'Lcom/google/cloud/backend/android/mobilebackend/model/EntityListDto;' failed
05-21 12:39:02.039: E/AndroidRuntime(16042): FATAL EXCEPTION: main
05-21 12:39:02.039: E/AndroidRuntime(16042): java.lang.NoClassDefFoundError: com.google.cloud.backend.android.GCMIntentService
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.