This is happening if the reference is not injected. The most likely root cause is that this class is not a service, and thus the fields are not injected. Can you post the annotations at class level? How do you get access to an instance of this class?