0
我得到一个nullPointerException与下面的构造函数......我还包括父类。控制器无法扩展类
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
和类(构造函数被排除在外,这样它将使用父类的构造)
public class ContentController extends com.site.cmt.library.Controller {
...
}
和父类
public class Controller {
private SortedMap<Integer, String> cssFiles;
private SortedMap<Integer, String> jsFiles;
public Controller() {
this.addCss("global.css");
this.addJs("global.js");
}
....
我怀疑addCss和addJs方法出了问题。你可以把控制器类的完整代码。请问 – raddykrish 2012-04-26 23:00:15
堆栈跟踪? – yair 2012-04-26 23:00:24