springMVC+hibernate整合出错

Errorcreatingbeanwithname'userDao'definedinServletContextresource[/WEB-INF/spring-dao... Error creating bean with name 'userDao' defined in ServletContext resource [/WEB-INF/spring-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in ServletContext resource [/WEB-INF/spring-hibernate.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: xmlHelper

错误信息如上面所示,其中应该是sessionFactory没配对,nested exception is java.lang.NoSuchFieldError: xmlHelper这一句错误信息比较蹊跷,不太明白

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<!-- key的名字前面都要加hibernate. -->
<prop key="hibernate.dialect">
<!-- org.hibernate.dialect.MySQLDialect -->
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>

<property name="mappingLocations">
<list>
<value>classpath:/com/dall/pojo/*.hbm.xml</value>
</list>
</property>
</bean>
展开
 我来答
匿名用户
2014-06-04
展开全部
那个类,没有那个xmlHelper属性
java.lang.NoSuchFieldError: xmlHelper
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式