項(xiàng)目編譯時(shí)報(bào)錯(cuò),下面給的是控制臺(tái)報(bào)錯(cuò)內(nèi)容,看不懂報(bào)的是什么錯(cuò),感覺(jué)是Spring容器sessionFactory出的錯(cuò),下面也給了applicationContext.xml配置,求大神指導(dǎo)下!謝謝報(bào)錯(cuò)內(nèi)容:嚴(yán)重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at?org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at?org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method)applicationContext.xml配置內(nèi)容<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">? ? <!-- 配置SessionFactory -->? <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" > <ref local="dataSource"/> </property> <!-- 配置Hibernate的屬性 --> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <!-- 指定HIbernate映射文件的路徑 --> <property name="mappingResources"> <list> <value>com/integration/entity/User.hbm.xml</value> </list> </property>? </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"> <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value> </property> <property name="url"> <value>jdbc:sqlserver://localhost:1433;DatabaseName=shuihu </value> </property> <property name="username"> <value>sa</value> </property> <property name="password"> <value>wu520zeng</value> </property> </bean> ? ? <bean id="userDAO" class="com.integration.dao.UserDAOImpl" abstract="false" lazy-init="default" autowire="default"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> ? <bean id="userService" class="com.integration.service.UserServiceImpl"> <property name="userDAO" ref="userDAO"></property> </bean> ? <bean id="userAction" class="com.integration.action.UserAction"> ? <property name="userService" ref="userService"></property> </bean> <bean id="loginAction" class="com.integration.action.LoginAction"> <property name="userService" ref="userService"></property> </bean> ? <bean id="userDeleteAction" class="com.integration.action.UserDeleteAction"> <property name="userService" ref="userService"></property> </bean> ? <bean id="userQueryAction" class="com.integration.action.UserQueryAction"> <property name="userService" ref="userService"></property> </bean> ? <bean id="userUpdateAction" class="com.integration.action.UserUpdateAction"> <property name="userService" ref="userService"></property> </bean></beans>
java Web項(xiàng)目關(guān)于hibernate整合Spring編譯報(bào)錯(cuò)?
快樂(lè)學(xué)習(xí)520
2016-07-28 20:29:35