[ERROR] [09/03/12 14:01:55.968] [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (StandardContext.java:3733) - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myTransactionManager' defined in ServletContext resource [/WEB-INF/spring/DataSource.xml]: Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/spring/DataSource.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.type.StringType
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myTransactionManager' defined in ServletContext resource [/WEB-INF/spring/DataSource.xml]: Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/spring/DataSource.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.type.StringType
解决方案 »
- 为什么会输出null?? servlet利用javabean向jsp传递数据
- 哪位用过swfupload来做上传?
- IE 加载 fusioncharts两次?
- JAVA高手请进关于手机game的
- jsp 报错显示cannot convert from int to string
- 请教各位:关于Ajax 提交form表单,不执行action中的方法!郁闷
- 检测指定的URL是否存在,很多资料推荐HttpWebRequest的GetResponse方法,并根据是否抛出异常来判断。 当指定的URL不存在且网站并未做任
- jsp 怎样把从数据库中查出的数据写到本地的txt文本中
- 为什么没人讨论下阿里巴巴的搜索。好像用LUCENE根本做不出来。很神秘。
- 时间日期控件,新手提问
- iframe
- 初学Struts对版本的问题
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"><bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/sspu</value>
</property>
</bean> <bean id="myTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="mySessionFactory" />
</property>
</bean> <bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>com/sspu/publicdb/modules/search/staff/eduinfoWorkloadInfo/domain/Term.hbm.xml</value>
<value>com/sspu/publicdb/modules/search/staff/eduinfoWorkloadInfo/domain/EduinfoWorkloadInfo.hbm.xml</value>
<value>com/sspu/publicdb/modules/search/staff/eduinfoWorkloadInfo/domain/Teachingwork.hbm.xml</value>
<value>com/sspu/publicdb/modules/search/staff/eduinfoWorkloadInfo/domain/Theorycourse.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key="hibernate.show_sql">false</prop> </props>
</property>
</bean></beans>
这个是DataSource.xml