Error creating bean with name 'dataSource'错误
严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframewor...
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values;
<!-- 定义使用C3P0连接池的数据源 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" >
<!-- 指定连接数据库的JDBC驱动 -->
<property name="driverClass">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriverr</value>
</property>
<!-- 连接数据库所用的URL -->
<property name="jdbcUrl">
<value>jdbc:sqlserver://localhost:1433; DatabaseName=shopping
</value>
</property>
<!-- 连接数据库的用户名 -->
<property name="user">
<value>sa</value>
</property>
<!-- 连接数据库的密码 -->
<property name="password">
<value>sa</value>
</property>
...................................... 展开
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values;
<!-- 定义使用C3P0连接池的数据源 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" >
<!-- 指定连接数据库的JDBC驱动 -->
<property name="driverClass">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriverr</value>
</property>
<!-- 连接数据库所用的URL -->
<property name="jdbcUrl">
<value>jdbc:sqlserver://localhost:1433; DatabaseName=shopping
</value>
</property>
<!-- 连接数据库的用户名 -->
<property name="user">
<value>sa</value>
</property>
<!-- 连接数据库的密码 -->
<property name="password">
<value>sa</value>
</property>
...................................... 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询