Purdue-ACM-SIGAPP/iris — pull request #13 by mhoc (2012-11-27 01:18:53+00:00)
Title: Fixed the ClassNotFoundError and an ensuing NullPointerException.

The ClassNotFoundError was fixed by adding the json-simple-1.1.1.jar library to the war/WEB_INF/lib directory, then adding it to the .classpath file manually. The jar file was downloaded from their Google Code page. Why it seems to need the library and it isn't included automatically... this I do not know. This commit also added a bunch of other versions of random libraries to that directory... I'm not sure why. But I don't think they hurt anything. They could be removed. Maybe.

This change also brought up a NullPointerException related to the datastore query. According to the App Engine API guide, you need to specify a limit to the size of the List returned from the PreparedQuery, it can't be null. If we want to have it return an unlimited number of Entities then it needs to return an Iteratable which will stream the Entities from the datastore. I set it to 10 (deviceIDs) for now.

The project now throws up an InvalidRequestException on the sender.send() call. I think it is because the GCM deviceID it is trying to send the message to isn't real. That'd be because I just threw in random letters to test the datastore, not a real deviceID. If that's the case then it should be working and good to go when tested with a real device.