Look at the line of your code that the stack trace references and figure out what is null. Beyond that, I would recommend wrapping your code in the code tags and posting the full stack trace for more...