当前位置:编程学习 > JAVA >>

MYSQL 连接报错,求解。

信息: Reloading this Context has started
2012-5-14 19:59:44 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2012-5-14 19:59:44 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/znjj] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2012-5-14 19:59:44 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/znjj] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2012-5-14 19:59:45 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext

<!-- 定义数据源Bean,使用C3P0数据源实现 -->
<bean id="dataSource" destroy-method="close"
class="com.mchange.v2.c3p0.ComboPooledDataSource">
<!-- 指定连接数据库的驱动 -->
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<!-- 指定连接数据库的URL -->
<property name="jdbcUrl"
value="jdbc:mysql://localhost:3306/auction"/>
<!-- 指定连接数据库的用户名 -->
<property name="user" value="root"/>
<!-- 指定连接数据库的密码 -->
<property name="password" value="123456"/>
<!-- 指定连接数据库连接池的最大连接数 -->
<property name="maxPoolSize" value="40"/>
<!-- 指定连接数据库连接池的最小连接数 -->
<property name="minPoolSize" value="1"/>
<!-- 指定连接数据库连接池的初始化连接数 -->
<property name="initialPoolSize" value="1"/>
<!-- 指定连接数据库连接池的连接的最大空闲时间 -->
<property name="maxIdleTime" value="20"/>
</bean>

mysql-connector-java-5.0.8-bin.jar
mysql版本是5.0.45
tomcat6
jdk1.6 --------------------编程问答-------------------- <bean id=。在哪个文件配置的? --------------------编程问答-------------------- id="dataSource"
你的数据源是这个吗???
补充:Java ,  Eclipse
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,