I’m getting a nullPointerException with the constructor below… I’ve also included the parent class.
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentController' defined in file [C:\Users\bkuhl\JavaProjects\cmt\cmt\target\cmt\WEB-INF\classes\com\site\cmt\web\ContentController.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.fettergroup.cmt.web.ContentController]: Constructor threw exception; nested exception is java.lang.NullPointerException
And the class (constructor was left out so that it would use the parent constructor)
public class ContentController extends com.site.cmt.library.Controller {
...
}
and the parent class
public class Controller {
private SortedMap<Integer, String> cssFiles;
private SortedMap<Integer, String> jsFiles;
public Controller () {
this.addCss("global.css");
this.addJs("global.js");
}
....
Did you tried ommit
addCssandaddJsto be sure that problem is not inside of implementation method?