Which init() method are you overriding?
or init(ServletConfig config)
If it's the latter, be sure the first line in the method body is
or else the ServletConfig object will not be stored by the servlet and you will get the errors you report.
Better yet, override the no-arguments init(), as the purpose of the no-arg version is to avoid having to call super.init(config).