The compiler has already told you what the problem is. It is also been helpful enough to tell you the line number at which the problem occurs.
Do you know what a NullPointerException is?
The problem with your code is you are invoking a method on an object instance which is null.
The instance is null because it has not been initialized when you invoke the method.
Hint: Check the sequence in which you are calling your internal methods.