You have not mentioned context info or atleast stacktrace.Please provide perfect answer. Any how please find the causes of null pointer exception.
- You are trying to acess the reference without assigning an object(created object).
eg: String s = null;
s.length();// null pointer exception.
I think u might know this concepts. For your scenario provide detail steps.