首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

高手帮小弟我看看 spring 有关问题,实在找不到有关问题的解决办法了

2013-09-11 
高手帮我看看 spring 问题,实在找不到问题的解决方法了。错误:try to login, userName:liwenjun password i

高手帮我看看 spring 问题,实在找不到问题的解决方法了。
错误:
try to login, userName:liwenjun password is:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xjtjLogic' d
efined in ServletContext resource [/WEB-INF/classes/applicationContext_logic_ywgl.xml]: Cannot creat
e inner bean 'com.thtf.bjstat.xjtj.domain.logic.SchoolbaseinfoLogic#97617' while setting bean proper
ty 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error crea
ting bean with name 'com.thtf.bjstat.xjtj.domain.logic.SchoolbaseinfoLogic#97617' defined in Servlet
Context resource [/WEB-INF/classes/applicationContext_logic_ywgl.xml]: Instantiation of bean failed;
nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [com.
thtf.bjstat.xjtj.domain.logic.SchoolbaseinfoLogic]; constructor threw exception; nested exception is
java.lang.ClassCastException: com.thtf.bjstat.xjtj.dao.hibernate.hql.SchoolBaseInfolDaoHibernateHQL
Impl
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.thtf.bjs
tat.xjtj.domain.logic.SchoolbaseinfoLogic#97617' defined in ServletContext resource [/WEB-INF/classe
s/applicationContext_logic_ywgl.xml]: Instantiation of bean failed; nested exception is org.springfr
amework.beans.FatalBeanException: Could not instantiate class [com.thtf.bjstat.xjtj.domain.logic.Sch
oolbaseinfoLogic]; constructor threw exception; nested exception is java.lang.ClassCastException: co
m.thtf.bjstat.xjtj.dao.hibernate.hql.SchoolBaseInfolDaoHibernateHQLImpl
org.springframework.beans.FatalBeanException: Could not instantiate class [com.thtf.bjstat.xjtj.doma
in.logic.SchoolbaseinfoLogic]; constructor threw exception; nested exception is java.lang.ClassCastE
xception: com.thtf.bjstat.xjtj.dao.hibernate.hql.SchoolBaseInfolDaoHibernateHQLImpl
java.lang.ClassCastException: com.thtf.bjstat.xjtj.dao.hibernate.hql.SchoolBaseInfolDaoHibernateHQLI
mpl
        at com.thtf.bjstat.xjtj.domain.logic.SchoolbaseinfoLogic.<init>(SchoolbaseinfoLogic.java:31)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:174)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:150)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleI
nstantiationStrategy.java:52)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateB
ean(AbstractAutowireCapableBeanFactory.java:494)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A
bstractAutowireCapableBeanFactory.java:381)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDef
inition(BeanDefinitionValueResolver.java:151)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNeces
sary(BeanDefinitionValueResolver.java:97)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropert
yValues(AbstractAutowireCapableBeanFactory.java:760)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
(AbstractAutowireCapableBeanFactory.java:571)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A
bstractAutowireCapableBeanFactory.java:414)
servers文件配置:
如下:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
<bean id="schoolBaseGradLogic" parent="baseTransactionProxy">
<property name="target">
<bean />
</property>
</bean>

   <bean id="worklevelsystemLogic" parent="baseTransactionProxy">
<property name="target">
<bean />
</property>
</bean>

<bean id="xjtjLogic" parent="baseTransactionProxy">
<property name="target">
<bean />
</property>
</bean>
</beans>
==================================
dao 文件配置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

<bean id="schoolBaseGradeDao" abstract="false" singleton="false" lazy-init="default" autowire="default" dependency-check="default">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
    <bean id="worklevelsystemDao" abstract="false" singleton="false" lazy-init="default" autowire="default" dependency-check="default">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
<bean id="xjtjDao" abstract="false" singleton="false" lazy-init="default" autowire="default" dependency-check="default">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
</beans>
=====================================================[b][b]
我的异常网推荐解决方案:org.springframework.beans.factory.BeanCreationException:,http://www.myexception.cn/j2ee/10759.html

热点排行