最近写了一个增删改查的程序,是基于struts+spring的,用到spring的就是service向action里注入,Dao向service里注入,配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!-- web layer -->
<bean name="/agencymanage/agencyManageAction"
class="com.dhc.neo.agencymanage.action.agencyManageAction">
<property name="agencyManageService" ref="agencyManageService" />
</bean><!-- service start -->
<bean id="agencyManageService" parent="baseTransactionProxyJdbcCRM">
<property name="target">
<bean
class="com.dhc.neo.agencymanage.service.impl.agencyManageServiceImpl">
<property name="agencyManageDao" ref="agencyManageDao" />
</bean>
</property>
</bean><!-- service end --><!-- dao start -->
<bean id="agencyManageDao"
class="com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl">
<property name="jdbcTemplate">
<ref bean="jdbcTemplateCRM" />
</property>
</bean>
<!-- dao end -->
</beans>添加后在启动tomcat服务器的时候报错
Cannot find class [com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl] for bean with name 'agencyManageDao' defined in ServletContext resource [/WEB-INF/xml/applicationContext-agencymanage.xml]; nested exception is java.lang.ClassNotFoundException: com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl
Caused by:
java.lang.ClassNotFoundException: com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl
这是什么原因呀,求高手指点
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!-- web layer -->
<bean name="/agencymanage/agencyManageAction"
class="com.dhc.neo.agencymanage.action.agencyManageAction">
<property name="agencyManageService" ref="agencyManageService" />
</bean><!-- service start -->
<bean id="agencyManageService" parent="baseTransactionProxyJdbcCRM">
<property name="target">
<bean
class="com.dhc.neo.agencymanage.service.impl.agencyManageServiceImpl">
<property name="agencyManageDao" ref="agencyManageDao" />
</bean>
</property>
</bean><!-- service end --><!-- dao start -->
<bean id="agencyManageDao"
class="com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl">
<property name="jdbcTemplate">
<ref bean="jdbcTemplateCRM" />
</property>
</bean>
<!-- dao end -->
</beans>添加后在启动tomcat服务器的时候报错
Cannot find class [com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl] for bean with name 'agencyManageDao' defined in ServletContext resource [/WEB-INF/xml/applicationContext-agencymanage.xml]; nested exception is java.lang.ClassNotFoundException: com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl
Caused by:
java.lang.ClassNotFoundException: com.dhc.neo.agencymanage.dao.impl.agencyManageDaoImpl
这是什么原因呀,求高手指点
解决方案 »
- WebService出现的一个小问题
- 在公司机子能运行,在家里不能运行,出现不能得到连接错误,麻烦帮忙看看~!
- myeclipse调试servlet和jsp调试时候出现如图
- 偷偷问个很龌龊的东西:有关文件的上传,服务器集群以后的问题
- 如何用POI对Excel数据进行查询?
- 如何把在win下用eclipse建立的java ee项目传送到linux服务器下编译并部署?
- 求教一个网站路径的问题
- 部署到jboss上面,jboss为什么总用它自己的数据源,怎么配置到我的数据源???
- 关于整型数组排列组合的问题
- 谁能给解释下hibernate这条简单的hql语句
- 帮忙看一段简单的代码,我看了一下午都不知道是哪的问题
- 哪位神仙做过类似IM的软件?
看看这个类是否在Classpath下面。
2010-12-05 09:15:53 [org.springframework.web.struts.ContextLoaderPlugIn]-[ERROR] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/agencymanage/agencyManageAction' defined in ServletContext resource [/WEB-INF/xml/applicationContext-agencymanage.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.dhc.neo.agencymanage.service.Impl.agencyManageServiceImpl$$EnhancerByCGLIB$$1e5a28f4] to required type [com.dhc.neo.agencymanage.service.agencyManageService] for property 'agencyManageService'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by:
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.dhc.neo.agencymanage.service.Impl.agencyManageServiceImpl$$EnhancerByCGLIB$$1e5a28f4] to required type [com.dhc.neo.agencymanage.service.agencyManageService] for property 'agencyManageService'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: No matching editors or conversion strategy found
SEVERE: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/agencymanage/agencyManageAction' defined in ServletContext resource [/WEB-INF/xml/applicationContext-agencymanage.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.dhc.neo.agencymanage.service.Impl.agencyManageServiceImpl$$EnhancerByCGLIB$$1e5a28f4] to required type [com.dhc.neo.agencymanage.service.agencyManageService] for property 'agencyManageService'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.dhc.neo.agencymanage.service.Impl.agencyManageServiceImpl$$EnhancerByCGLIB$$1e5a28f4] to required type [com.dhc.neo.agencymanage.service.agencyManageService] for property 'agencyManageService'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by: java.lang.IllegalArgumentException: No matching editors or conversion strategy found