首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

hibernate+spring报错!求答案!该如何解决

2012-01-20 
hibernate+spring报错!急求答案! 我的配置文件是这样的,老是报这样的错,请问如何解决?谢谢谢谢啦!!?xmlve

hibernate+spring报错!急求答案!

我的配置文件是这样的,老是报这样的错,请问如何解决?谢谢谢谢啦!!
<?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= "sessionFactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean ">

<property   name= "configLocation ">
<value> classpath:hibernate.cfg.xml </value>
</property>

<property   name= "dataSource ">
<ref   local= "dataSource "/>
</property>

<property   name= "hibernateProperties ">
<props>
<prop   key= "hibernate.dialect "> org.hibernate.dialect.MySQLDialect </prop>
<prop   key= "hibernate.show_sql "> true </prop>
</props>
</property>

<property   name= "mappingResources ">
<list>
<value> User.hbm.xml </value>
</list>
</property>
</bean>
<bean   id= "dataSource "
class= "org.springframework.jdbc.datasource.DriverManagerDataSource ">
<property   name= "driverClassName ">
<value> com.mysql.jdbc.Driver </value>
</property>
<property   name= "url ">
<value> jdbc:mysql://localhost:3306/mydb </value>
</property>
<property   name= "username ">
<value> root </value>
</property>
<property   name= "password ">
<value> root </value>
</property>
</bean>
<bean   id= "hibernateTemplate "
class= "org.springframework.orm.hibernate3.HibernateTemplate "
abstract= "false "   singleton= "true "   lazy-init= "default "
autowire= "default "   dependency-check= "default ">
<property   name= "sessionFactory ">
<ref   bean= "sessionFactory "   />
</property>
</bean>
<bean   id= "userDao "   class= "com.zhg.UserDAOHibernate "   abstract= "false "
singleton= "true "   lazy-init= "default "   autowire= "default "
dependency-check= "default ">
<property   name= "hibernateTemplate ">
<ref   bean= "hibernateTemplate "   />
</property>
</bean> </beans>

[解决办法]
sf
[解决办法]

[解决办法]
错误呢?
[解决办法]
关注
[解决办法]
报哪样的错呀,BS楼猪,提问都不会!

热点排行