第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

java Web項目關(guān)于hibernate整合Spring編譯報錯?

java Web項目關(guān)于hibernate整合Spring編譯報錯?

快樂學(xué)習(xí)520 2016-07-28 20:29:35
項目編譯時報錯,下面給的是控制臺報錯內(nèi)容,看不懂報的是什么錯,感覺是Spring容器sessionFactory出的錯,下面也給了applicationContext.xml配置,求大神指導(dǎo)下!謝謝報錯內(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>
查看完整描述

1 回答

?
呵呵呵呵加呵呵呵

TA貢獻(xiàn)14條經(jīng)驗 獲得超8個贊

dataSource怎么配的?

查看完整回答
反對 回復(fù) 2016-07-30
  • 1 回答
  • 0 關(guān)注
  • 1644 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號