2011-02-18 22:41:59 [日志信息] Could not open template
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberAction' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847' to required type 'com.rjlab.service.MemberService' for property 'service'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847] to required type [com.rjlab.service.MemberService] for property 'service': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1044)
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:189)
at org.apache.struts2.components.Form.evaluateExtraParamsServletRequest(Form.java:283)
at org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:237)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:738)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:56)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:482)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:201)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847' to required type 'com.rjlab.service.MemberService' for property 'service'; nested exception is java.lang.IllegalStateException: Cannot convert value of type[com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847] to required type [com.rjlab.service.MemberService] for property 'service': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:462)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1354)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1313)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
... 37 more
Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847] to required type [com.rjlab.service.MemberService] for property 'service': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:289)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:154)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:452)
... 41 more
2011-2-18 22:41:59 org.apache.catalina.core.StandardWrapperValve invoke查了很多都不管用
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberAction' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847' to required type 'com.rjlab.service.MemberService' for property 'service'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847] to required type [com.rjlab.service.MemberService] for property 'service': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1044)
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:189)
at org.apache.struts2.components.Form.evaluateExtraParamsServletRequest(Form.java:283)
at org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:237)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:738)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:56)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:482)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:201)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847' to required type 'com.rjlab.service.MemberService' for property 'service'; nested exception is java.lang.IllegalStateException: Cannot convert value of type[com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847] to required type [com.rjlab.service.MemberService] for property 'service': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:462)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1354)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1313)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
... 37 more
Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.rjlab.service.MemberServiceImpl$$EnhancerByCGLIB$$bd1f8847] to required type [com.rjlab.service.MemberService] for property 'service': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:289)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:154)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:452)
... 41 more
2011-2-18 22:41:59 org.apache.catalina.core.StandardWrapperValve invoke查了很多都不管用
<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<!-- 针对指定的bean自动生成业务代理 -->
<property name="beanNames">
<list>
<value>memberService</value>
</list>
</property>
<!-- 这个属性为true时,表示被代理的是目标类本身而不是目标类的接口 -->
<property name="proxyTargetClass">
<value>true</value>
</property>
<!-- 依赖注入上面定义的事务拦截器transactionInterceptor -->
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
</list>
</property>
</bean>
<!-- 装配通用数据库访问类BaseDAOImpl -->
<bean id="dao" class="com.rjlab.DAO.BaseDAOImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 部署系统用户管理业务逻辑组件MemberServiceImpl -->
<bean id="memberService" class="com.rjlab.service.MemberServiceImpl">
<property name="dao" ref="dao"/>
</bean>
<!-- 部署Struts2负责系统用户管理的控制器MemberAction -->
<bean id="memberAction" class="com.rjlab.action.MemberAction" scope="prototype">
<property name="service" ref="memberService"/>
</bean>
<bean id="xxxProxy" parent="myTransactionProxyFactoryBean">
<property name="target">
<ref local="memberService" />
</property>
</bean>
<bean id="memberAction" class="com.rjlab.action.MemberAction" scope="prototype">
<property name="service" ref="memberService"/>
</bean> 你的bean 里的id 改成name name 的值 为struts-config.xml 里path 的值我觉得你用的是struts1 做的吧 sturts2 中 不用这样配置。
private MemberService service;
然后提供set和get方法
如果你写成private MemberServiceImpl service;
那样就会出错啦