1
votes

I'm trying to setup the Geek Serendipity backend sample as demoed at Google IO (http://bradabrams.com/2013/05/google-io-2013-session-overview-from-nothing-to-nirvana-in-minutes-cloud-backend-for-your-android-application-building-geek-serendipity/)

I'm following the instructions at https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-java (I'm deploying from source code as I will need to later add some custom endpoints)

However, after following the instructions and deploying to AppEngine, I can't access the homepage of the deployed app (configure.jsp) to UNLOCK the app for development calls. I'm getting the a NullPointer on XSRFTokenUtility.java.

Uncaught exception from servlet
java.lang.NullPointerException
        at com.google.cloud.backend.config.XSRFTokenUtility.buildTokenString(XSRFTokenUtility.java:136)
        at com.google.cloud.backend.config.XSRFTokenUtility.getToken(XSRFTokenUtility.java:64)
        at com.google.cloud.backend.config.ConfigurationServlet.getToken(ConfigurationServlet.java:208)
        at org.apache.jsp.admin.configure_jsp._jspService(configure_jsp.java:56)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
        at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 

Other details:

App ID: mobile-starter-yaraju-1

Eclipse version: 4.2 (Juno)

AppEngine SDK version: 1.8.5

Google Plugin for Eclipse: 3.4.1.v201309130745-rel-r42

OS: Windows 8 64-bit

2

2 Answers

2
votes

Finally solved this problem. The source code is fine, and I had a malformed web.xml getting extracted from the zip.

If this happens to you, clear your Windows Temp cache, and extract the backend zip again.

0
votes

My solution: Don't deploy from source code.

Follow this page: http://developers.google.com/cloud/samples/mbs/deploy_backend

And the option to deploy a "Mobile Sample App" is finally back. Deploy straight to the cloud, and the backend runs fine with the sample Android client app