That's way too much code to wade through, but the Exception is telling you what's wrong: on line 187, you're dereferencing a null Object. You can't do that. Make sure that all of your variables...