2011-8-5 8:34:13 net.sf.ehcache.config.ConfigurationFactory parseConfiguration
警告: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/OgSchedule/WEB-INF/lib/ehcache-1.6.2.jar!/ehcache-failsafe.xml
2011-8-5 8:34:13 net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict
警告: Creating a new instance of CacheManager using the diskStorePath "C:\WINDOWS\TEMP\" which is already used by an existing CacheManager.
The source of the configuration was classpath.
The diskStore path for this CacheManager will be set to C:\WINDOWS\TEMP\\ehcache_auto_created_1312504453046.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
org.hibernate.exception.GenericJDBCException: Cannot open connection
。。。
=======================================================
原因:MySQL預設的串連數是100,太少!自己的SSH項目開的串連數比這個大。
解決:(windows環境)
1.到C:\Program Files\MySQL\MySQL Server 5.0下面找到my.ini檔案,記事本開啟,找到“max_connections=100”改成:max_connections=10000
2.設定SSH項目的c3p0.min_size(這裡是c3p0串連池)小點,這裡可以不去管它,不可能比10000大吧
3.管理工具--服務:重啟MySQL服務
mysql manual有如下的說明:
mysqld actually allows
max_connections+1
clients to connect. The extra connection is reserved for use by accounts that have the
SUPER privilege. By granting the SUPER privilege to administrators and not to normal users (who should not need it), an administrator can connect to the server and use SHOW PROCESSLIST to diagnose problems even if the maximum number of unprivileged clients
are connected.
因此, 必須只賦予root使用者的SUPER許可權,同時所有資料庫連接的帳戶不能賦予SUPER許可權。前面說到的報錯後無法登入就是由於我們的應用程式直接配置的root使用者