Look closely at your code...something is null - add some println's in there to print out each object and see what is null (hint, take a look at p2 and p3 variables)