Fix nullpointer exception in jersey restful on android