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