tomcat启动占了12g_数据连接不上,TOMCAT运行超时的原因找到了,竟然是这个。。。。。 - Java论坛 - 51CTO技术论坛_中国领先的IT技术社区...

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后,还是无法解决。

都已经快放弃了。

偶然有一次,我电脑注销后重新登录,这些功能都能运行了。很奇怪。

对比了下,注销后,我登录时输入了密码,正常开机时,由于嫌麻烦,设置为自动登录,没有设置需要输入密码。

问题解决了,但是还是不知道原因,有哪位大神帮忙分析下原因。

d86a14d709909a81d23c9d91fc1d2804.gif

附件1.jpg

(64.03 KB)

2016-8-2 14:23

tomcat设置

4c95deb97d84274b9d81f63f9921c4b7.png

分享至:

90ed4b13fe016cebd9fe3df2ae3a899b.gif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值