What is null on that line? The stack trace tells you exactly which line throws the exception, look at the variables accessed on that line to see which is null (us System.out.println if you have to). ...