Android to Appengine RPC Nullponter on server

Freelance Jobs

I have a Appengine connected Andorid project, to enable RPC calls between the server and the Android device. When I'm doing calls on the GWT client everything works perfectly, but when I'm doing calls from the Android app the server throws this nullpointer exception. I'm making RPC calls with a Requestfactory. GAE version 1.5.2

[ERROR] Unexpected error
    at java.util.concurrent.ConcurrentHashMap.get(
    at javax.servlet.http.HttpServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.mortbay.jetty.servlet.ServletHolder.handle(
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.mortbay.jetty.servlet.ServletHandler.handle(
    at org.mortbay.jetty.servlet.SessionHandler.handle(
    at org.mortbay.jetty.handler.ContextHandler.handle(
    at org.mortbay.jetty.webapp.WebAppContext.handle(
    at org.mortbay.jetty.handler.HandlerWrapper.handle(
    at org.mortbay.jetty.handler.HandlerWrapper.handle(
    at org.mortbay.jetty.Server.handle(
    at org.mortbay.jetty.HttpConnection.handleRequest(
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(
    at org.mortbay.jetty.HttpParser.parseNext(
    at org.mortbay.jetty.HttpParser.parseAvailable(
    at org.mortbay.jetty.HttpConnection.handle(
    at org.mortbay.thread.QueuedThreadPool$

The problem is that the stack trace doesn't provide any information about some issues in my code.

What I want to do is to send an Exception from the Android Client to the AppEngine Server. So that's the android side code.

new AsyncTask<Void, Void, Void>() {

            protected Void doInBackground(Void... arg0) {
                MyRequestFactory factory = (MyRequestFactory) Util
                ExceptionRequest request = factory.exceptionRequest();

                ExceptionProxy ep = request.create(ExceptionProxy.class);

                return null;


And that throws this exception (Internal Server Error)

09-05 22:29:36.104: ERROR/AndroidRuntime(602): Caused by: java.lang.RuntimeException: Internal Server Error
09-05 22:29:36.104: ERROR/AndroidRuntime(602):     at
09-05 22:29:36.104: ERROR/AndroidRuntime(602):     at
09-05 22:29:36.104: ERROR/AndroidRuntime(602):     ... 13 more

Doing RPC on the web client works perfectly but on the Android one I can't get it to work.

Dominic BartlH
2011-08-31 18:27:26 Scores:1
Since you haven't told us anything at all about your app or how you're calling it, I don't see how anyone could possibly figure out what's wrong.
Nick JohnsonH
2011-09-05 05:08:47 Scores:0
updated the question with more information
Dominic BartlH
2011-09-05 20:46:25 Scores:0

3 answers

Answer 1

I encountered this and accidentally (I think) found an answer to it. Create a new AppEngine app (not a new App Engine Connected Android project, but literally going to, and try testing it on your newly created app. I think they made some changes to AppEngine, and you need a new one to properly use App Engine Connected Android Project.

Best of luck!

spierce7 H
2011-09-15 07:48:02
Answer 2

It's because of the version of the GAE. Update it to 1.6.1.

Wenbo H
2012-01-14 22:03:18
The question is kinda old and I already fixed it. I just forgot to write an answer here. Yes I made an update and it worked since then.
Dominic Bartl H
2012-01-14 23:32:59 Scores:0
Answer 3

In order to have an android app working with google app engine, you must create the App Engine connected Android project in Eclipse with GWT 2.3.0 configurated by default: Windows -> Preferences -> Google -> Web Toolkit (and not 2.4.0rc1)

If you try change the GWT version from 2.4.0rc1 to 2.3.0 after having created a project, you will always have this error with the android app (web app will work)

Riego H
2012-06-16 21:39:39
Share |
View original post at

Related topics

How would you implement a secure static login credentials system in Java?

We recently had a security audit and it exposed several weaknesses in the systems that are in place here. One of the tasks that resulted from it is that we need to update our partner credentials system make it more secure. The "old" way of doing things was ...

how can i get value fron the URL in python appengine?

if i have this URL in from python code on appengine http://localhost:8080/blog/view/2f1cab5844fb432b8426ae666c4ac493 how can i get the value of the key : 2f1cab5844fb432b8426ae666c4ac493 ...

Upload to Appengine Blobstore in Android

I'm working on a simple multimedia messaging app for Android, and I was trying to use Google AppEngine's BlobStore as my cloud storage for the various image, video, and audio files that will be transferred. However, all of the examples and such that I've seen for uploading to blobstore ...

Appengine authentication on Android

I have a Python App Engine application where a user can log in using foursquare, then they must log in using Hunch. This all works fine but now I am trying to allow the user to authenticate on the android device. I don't want the user to have to log ...

Connection between Android and AppEngine! Suggestions

I'm about to start a new project where an android client and a gwt client has to communicate with an appengine server. My first thougts were GWT to Appengine = RPC Android to Appengine = RPC Appengine to Android = C2DM My question is if you have better ideas to solve a communication. Basically what ...

Android/Appengine "anonymous" access

I'm planning to develop an Android application with an app-engine backend. However I would like to refrain from using authentication (either with Google accounts or Open ID). Since the data will be sent only from my app and not any other client, and will be over SSL connection, I consider the ...

How to get image from AppEngine Server into Android activity

I'm trying to fetch an image from the AppEngine server in development mode, using this code from here: HttpGet httpRequest = new HttpGet(URI.create(url) ); HttpClient httpclient = new DefaultHttpClient(); HttpResponse resp = (HttpResponse) httpclient.execute(httpRequest); HttpEntity entity = resp.getEntity(); BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity); InputStream instream = bufHttpEntity.getContent(); bmp = BitmapFactory.decodeStream(instream); When executing the 3rd line (httpclient.execute(..)) I ...

Login to appengine from android client

I am attempting to login to appengine to app engine and access the User service API in app engine. Basically I want to be able to see who is logged in to my servlets. I am using the authentication flow of getting authtoken from android and then gettting ...

Getting an auth token for appengine in ICS

I am having a problem retrieving an authentication token for an appengine application in Android. I am following the docs, in that I get the users google account, and attempt to get the auth token from the account manager which works fine. However I get an intent back from the ...

Sharing data between AppEngine and Android

I want to use AppEngine with Android based on C2DM, but I have strange question. Is there any possibility or metodology to share logic and maybe data of application between server and client? If I want to play chess online it is ok, but what if my game offers also ...