SPRING3+HIBERNATE4配置错误 数据库服务均已开启,URL,用户名,密码没有错误;已经通过JDBC程序验证,WEB程序启动没有问题,但是当访问数据库的时候报错
jdbc.properties(部分):
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@localhost:1521:ORCL
jdbc.username=scott
jdbc.password=scott
spring.xml:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:jdbc.properties</value>
</list>
</property>
</bean>
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver" value="${jdbc.driverClassName}"></property>
<property name="driverUrl" value="${jdbc.url}"></property>
<property name="user" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="maximumConnectionCount" value="${proxool.maxConnCount}" />
<property name="minimumConnectionCount" value="${proxool.minConnCount}" />
<property name="statistics" value="${proxool.statistics}" />
<property name="simultaneousBuildThrottle" value="${proxool.simultaneousBuildThrottle}" />
<property name="trace" value="${proxool.trace}" />
<property name="verbose" value="${proxool.verbose}" />
</bean>
具体错误信息如下:
严重: Exception occurred during processing request: Could not open Hibernate Session for transaction; nested exception is java.lang.UnsupportedOperationException: You should configure the username and password within the proxool configuration and just call getConnection() instead. org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.UnsupportedOperationException: You should configure the username and password within the proxool configuration and just call getConnection() instead.