Whenever I am calling the getFriendList function from the xhtml page I am getting an exception. The page keeps on loading and after that I stop the browser. I get the given stackstrace. Its is telling me that there is an error at line no.78 friends.add(friend); . I think there is something wrong with my syntax. It would be helpful if someone point the error.