0
當我嘗試在我現有的spring項目中使用junit來進行整合時,出現以下錯誤。在類路徑資源中定義名稱爲'/ sbhupload'的Bean時出錯 - Junit
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '/sbhupload' defined in class path
> resource [com/scb/test/base/CAD_ApplicationContext_Test.xml]:
> Instantiation of bean failed; nested exception is
> java.lang.ExceptionInInitializerError
有趣的部分如下。初始化程序中的異常是什麼? – thst
所致:顯示java.lang.NullPointerException \t在組織:在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本機方法)java.lang.ExceptionInInitializerError \t \t 在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java –
致.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577) \t at org.apache.struts.actions.DispatchAction。(DispatchAction.java:153) \t ... 40 more –