Class must not be null

zyl1011 2014-11-24 10:22:51
在使用XFire的时候。加载Bean时候出现异常了。本地没问题,但是打包打测试环境就抛出以下异常。搞了一天了。都没搞出来,求大神指导!
在XFire-servlet.xml中增加新的WebService定义:
</entry>
<!--日终核对接口定义-->
<entry key="/CMSServiceByDayEnd.ws">
<ref bean="CMSServiceByDayEndService" />
</entry>
<bean id="CMSServiceByDayEndBean" class="com.webservice.hr.service.impl.CMSServiceByDayEnd">
</bean>
<!--日终核对接口定义-->
<bean id="CMSServiceByDayEndService" parent="baseWebService">
<property name="serviceBean" ref="CMSServiceByDayEndBean" ></property>
<!-- 业务服务bean的窄接口类 -->
<property name="serviceClass" value="com.webservice.hr.service.ICMSServiceByDayEnd" />
</bean>
抛出如下异常:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping' defined in ServletContext resource
[/WEB-INF/xfire-servlet.xml]:
Cannot resolve reference to bean 'CMSServiceByDayEndService' while setting bean property 'urlMap' with key
[TypedStringValue: value [/CMSServiceByDayEnd.ws], target type [null]];
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'CMSServiceByDayEndService' defined in ServletContext resource
[/WEB-INF/xfire-servlet.xml]:
Cannot resolve reference to bean 'CMSServiceByDayEndBean' while setting bean property 'serviceBean';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'CMSServiceByDayEndBean' defined in ServletContext resource
[/WEB-INF/xfire-servlet.xml]:
Instantiation of bean failed;
nested exception is org.springframework.beans.BeanInstantiationException:
Could not instantiate bean class
[com.webservice.hr.service.impl.CMSServiceByDayEnd]:
Constructor threw exception;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IT020206Bs' defined in file
[/home/wasadmin/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TKCMS-RPAY1Node01Cell/tkcms_war.ear/tkcms.war/WEB-INF/conf/applicationContext/applicationContext-recvpay.xml]:
Cannot resolve reference to bean 'IT020206Bs_target' while setting bean property 'target';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IT020206Bs_target' defined in file
[/home/wasadmin/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TKCMS-RPAY1Node01Cell/tkcms_war.ear/tkcms.war/WEB-INF/conf/applicationContext/applicationContext-recvpay.xml]:
Cannot resolve reference to bean 'IBankAccountBs' while setting bean property 'bankAccountBs';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IBankAccountBs' defined in file
[/home/wasadmin/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TKCMS-RPAY1Node01Cell/tkcms_war.ear/tkcms.war/WEB-INF/conf/applicationContext/applicationContext-account.xml]:
Cannot resolve reference to bean 'IBankAccountBs_target' while setting bean property 'target';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IBankAccountBs_target' defined in file
[/home/wasadmin/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TKCMS-RPAY1Node01Cell/tkcms_war.ear/tkcms.war/WEB-INF/conf/applicationContext/applicationContext-account.xml]:
Cannot resolve reference to bean 'IProofImportSapBs_target' while setting bean property 'proofImportSapBs';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IProofImportSapBs_target' defined in file
[/home/wasadmin/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TKCMS-RPAY1Node01Cell/tkcms_war.ear/tkcms.war/WEB-INF/conf/applicationContext/applicationContext-sapservice.xml]:
Cannot resolve reference to bean 'IAuditEntDetailBs_target' while setting bean property 'auditEntDetailBs';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IAuditEntDetailBs_target' defined in file
[/home/wasadmin/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TKCMS-RPAY1Node01Cell/tkcms_war.ear/tkcms.war/WEB-INF/conf/applicationContext/applicationContext-bankAudit.xml]:
Cannot resolve reference to bean 'IBankAccountBs' while setting bean property 'bankAccountBs';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'IBankAccountBs':
FactoryBean threw exception on object creation;
nested exception is java.lang.IllegalArgumentException:
Class must not be null

...全文
612 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zyl1011 2014-11-24
  • 打赏
  • 举报
回复
引用 3 楼 xingshen100 的回复:
感觉是key的路径写的不对,导致找不到,所以报null.
你说的是这一句: [TypedStringValue: value [/CMSServiceByDayEnd.ws], target type [null]]; 这个应该是说在获取接口定义的实现类BEAN时候出现了这个错误。 Error creating bean with name 'CMSServiceByDayEndService' defined in ServletContext resource ; 所以才导致了/CMSServiceByDayEnd.ws 为NULL。因为实例化这个的时候出错了。所以定义的访问名称/CMSServiceByDayEnd.ws没有相应的处理类。
xingshen100 2014-11-24
  • 打赏
  • 举报
回复
感觉是key的路径写的不对,导致找不到,所以报null.
zyl1011 2014-11-24
  • 打赏
  • 举报
回复
在线等!!!求大神!!
zyl1011 2014-11-24
  • 打赏
  • 举报
回复
问题中不存在丢失class的问题。我已经检查过很多遍,需要的CLASS文件都已经存在。

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧