1. eclipse 无法连接mysql ,h2数据库, sqlite数据库可以连接
H2数据库
七月 18, 2016 10:44:37 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [teamlog_h2] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
七月 18, 2016 10:44:37 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [teamlog_h2] appears to have started a thread named [H2 TCP Server (tcp://192.168.1.101:9092)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
mysql
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://192.168.1.104:3306/teamlog?useUnicode=yes&characterEncoding=utf8, username = teamlog_admin. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
mysql数据库,本地可以连接 但是只能以这种方式连接,mysql -h 127.0.0.1 -uroot -p
以这种连接方式会报错 mysql -uroot -p
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
2. ecllipse配置tomcat,超时后会报错,把时间设置足够长可以用,
在网上搜了各种解决方法,都没有解决,把相同代码运行到linux上面,正常运行不报错。
怀疑是电脑开发环境问题,重装了jdk和eclipse后,还是无法解决。
都已经快放弃了。
偶然有一次,我电脑注销后重新登录,这些功能都能运行了。很奇怪。
对比了下,注销后,我登录时输入了密码,正常开机时,由于嫌麻烦,设置为自动登录,没有设置需要输入密码。
问题解决了,但是还是不知道原因,有哪位大神帮忙分析下原因。
附件1.jpg
(64.03 KB)
2016-8-2 14:23
tomcat设置
分享至: