2017-08-05 65 views
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 
+0

有趣的部分如下。初始化程序中的异常是什么? – thst

+0

所致:显示java.lang.NullPointerException \t在组织:在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)java.lang.ExceptionInInitializerError \t \t 在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java –

+0

致.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577) \t at org.apache.struts.actions.DispatchAction。(DispatchAction.java:153) \t ... 40 more –

回答

0

您似乎错过了您的类路径上提供的消息资源。由于您没有提供任何代码,因此无法再说。

MessageResources是通过struts框架(可能为jsp标签)解决的文本和i18n翻译。

这些通常是foo_<locale_country>.properties的文件

相关问题